-modernize-use-trailing-return-type,
-performance-no-int-to-ptr,
-readability-braces-around-statements,
- -readability-else-after-return,
-readability-function-cognitive-complexity,
-readability-identifier-length,
-readability-implicit-bool-conversion,
##
## Create a basic image and run all lua built-in functions on it.
## The image file and the Lua test file are created within this script.
-set -x
+
if [ -z "$XDG_CONFIG_HOME" ]
then
config_home="$HOME/.config"
gtk_menu_popup_at_pointer(GTK_MENU(menu), nullptr);
return TRUE;
}
- else if (bevent->button == MOUSE_BUTTON_MIDDLE)
+
+ if (bevent->button == MOUSE_BUTTON_MIDDLE)
{
bar_pane_gps_map_centreing(pgd);
return TRUE;
}
- else if (bevent->button == MOUSE_BUTTON_LEFT)
+
+ if (bevent->button == MOUSE_BUTTON_LEFT)
{
clipboard = gtk_clipboard_get(GDK_SELECTION_PRIMARY);
geo_coords = g_strdup_printf("%lf %lf",
return TRUE;
}
- else
- {
- return FALSE;
- }
+
+ return FALSE;
}
#endif
return (!success);
}
- else if (cd->list_dir)
+ if (cd->list_dir)
{
FileData *fd;
return FALSE;
}
- else if (cd->list_dir)
+ if (cd->list_dir)
{
FileData *fd;
g_string_append(extended_filename_buffer, buf);
continue;
}
- else
- {
- /* end of extended filename found */
- g_string_append_len(extended_filename_buffer, buf, p - buf);
- reading_extended_filename = FALSE;
- }
+
+ /* end of extended filename found */
+ g_string_append_len(extended_filename_buffer, buf, p - buf);
+ reading_extended_filename = FALSE;
}
if (extended_filename_buffer->len > 0)
if (options->file_sort.case_sensitive)
return strcmp(cia->fd->collate_key_name, cib->fd->collate_key_name);
- else
- return strcmp(cia->fd->collate_key_name_nocase, cib->fd->collate_key_name_nocase);
+
+ return strcmp(cia->fd->collate_key_name_nocase, cib->fd->collate_key_name_nocase);
}
GList *collection_list_sort(GList *list, SortType method)
while (*ptr != '\n' && *ptr != '\0') ptr++;
if (*ptr == '\0')
break;
- else
- while (*ptr == '\n') ptr++;
+
+ while (*ptr == '\n') ptr++;
info = static_cast<CollectInfo *>(g_list_nth_data(cd->list, item_number));
if (!info) continue;
collection_dialog_save_close(cw->cd);
return;
}
- else if (!collection_save(cw->cd, cw->cd->path))
+
+ if (!collection_save(cw->cd, cw->cd->path))
{
gchar *buf;
buf = g_strdup_printf(_("Failed to save the collection:\n%s"), cw->cd->path);
cmsCloseProfile(profile);
return static_cast<guchar *>(data);
}
- else
- {
- cmsCloseProfile(profile);
- return nullptr;
- }
- }
- else
- {
+
+ cmsCloseProfile(profile);
return nullptr;
}
+
+ return nullptr;
}
guchar *heif_color_profile(FileData *fd, guint *profile_len)
return static_cast<guchar *>(data);
}
- else
- {
- error_code = heif_image_handle_get_nclx_color_profile(handle, &nclxcp);
- if (error_code.code)
- {
- log_printf("warning: heif reader error: %s\n", error_code.message);
- heif_context_free(ctx);
- heif_nclx_color_profile_free(nclxcp);
- return nullptr;
- }
- profile = nclx_to_lcms_profile(nclxcp, profile_len);
+ error_code = heif_image_handle_get_nclx_color_profile(handle, &nclxcp);
+ if (error_code.code)
+ {
+ log_printf("warning: heif reader error: %s\n", error_code.message);
+ heif_context_free(ctx);
+ heif_nclx_color_profile_free(nclxcp);
+ return nullptr;
}
+ profile = nclx_to_lcms_profile(nclxcp, profile_len);
+
heif_context_free(ctx);
heif_nclx_color_profile_free(nclxcp);
return;
}
- else if (force ||
+
+ if (force ||
value == 0.0 ||
dw->setup_count == 0 ||
dw->setup_time_count == 0 ||
{
return TRUE;
}
- else
- {
- return FALSE;
- }
- }
- else
- {
+
return FALSE;
}
+ return FALSE;
}
if (mask & DUPE_MATCH_NAME_CI_CONTENT)
{
{
return TRUE;
}
- else
- {
- return FALSE;
- }
- }
- else
- {
+
return FALSE;
}
+ return FALSE;
+
}
if (mask & DUPE_MATCH_SIZE)
{
{
return -1;
}
- else
- {
- return strcmp(di1->md5sum, di2->md5sum);
- }
+
+ return strcmp(di1->md5sum, di2->md5sum);
}
if (mask & DUPE_MATCH_DIM)
{
{
return TRUE;
}
- else
- {
- dw->add_files_queue_id = 0;
- dupe_destroy_list_cache(dw);
- g_idle_add(dupe_check_start_cb, dw);
- gtk_widget_set_sensitive(dw->controls_box, TRUE);
- return FALSE;
- }
+
+ dw->add_files_queue_id = 0;
+ dupe_destroy_list_cache(dw);
+ g_idle_add(dupe_check_start_cb, dw);
+ gtk_widget_set_sensitive(dw->controls_box, TRUE);
+ return FALSE;
}
static void dupe_files_add(DupeWindow *dw, CollectionData *, CollectInfo *info,
{
return;
}
- else
- {
- work = work->next;
- }
+
+ work = work->next;
}
if (dw->second_list)
{
return;
}
- else
- {
- work = work->next;
- }
+
+ work = work->next;
}
}
page_n_of_m = g_strdup_printf("[%d/%d]", fd->page_num + 1, fd->page_total);
return page_n_of_m;
}
- else
- {
- return nullptr;
- }
+
+ return nullptr;
}
return g_strdup("");
}
file_data_set_collate_keys(fd);
return;
}
- else if (strcmp(fd->name, ".") == 0)
+
+ if (strcmp(fd->name, ".") == 0)
{
g_free(fd->path);
fd->path = remove_level_from_path(path);
{
if (isdir(fd->path) && !islink(fd->path))
return rmdir_utf8(fd->path);
- else
- if (options->file_ops.safe_delete_enable)
- return file_util_safe_unlink(fd->path);
- else
- return unlink_file(fd->path);
+
+ if (options->file_ops.safe_delete_enable)
+ return file_util_safe_unlink(fd->path);
+
+ return unlink_file(fd->path);
}
gboolean file_data_perform_ci(FileData *fd)
{
return gdk_pixbuf_format_get_name(format);
}
- else
- {
- return nullptr;
- }
+
+ return nullptr;
}
+
static gchar** image_loader_gdk_get_format_mime_types(gpointer loader)
{
return gdk_pixbuf_format_get_mime_types(gdk_pixbuf_loader_get_format(GDK_PIXBUF_LOADER(loader)));
heif_context_free(ctx);
return FALSE;
}
- else
- {
- page_total = heif_context_get_number_of_top_level_images(ctx);
- ld->page_total = page_total;
- std::vector<heif_item_id> IDs(page_total);
+ page_total = heif_context_get_number_of_top_level_images(ctx);
+ ld->page_total = page_total;
+
+ std::vector<heif_item_id> IDs(page_total);
- /* get list of all (top level) image IDs */
- heif_context_get_list_of_top_level_image_IDs(ctx, IDs.data(), page_total);
+ /* get list of all (top level) image IDs */
+ heif_context_get_list_of_top_level_image_IDs(ctx, IDs.data(), page_total);
- error_code = heif_context_get_image_handle(ctx, IDs[ld->page_num], &handle);
- if (error_code.code)
- {
- log_printf("warning: heif reader error: %s\n", error_code.message);
- heif_context_free(ctx);
- return FALSE;
- }
+ error_code = heif_context_get_image_handle(ctx, IDs[ld->page_num], &handle);
+ if (error_code.code)
+ {
+ log_printf("warning: heif reader error: %s\n", error_code.message);
+ heif_context_free(ctx);
+ return FALSE;
+ }
- // decode the image and convert colorspace to RGB, saved as 24bit interleaved
- error_code = heif_decode_image(handle, &img, heif_colorspace_RGB, heif_chroma_interleaved_24bit, nullptr);
- if (error_code.code)
- {
- log_printf("warning: heif reader error: %s\n", error_code.message);
- heif_context_free(ctx);
- return FALSE;
- }
+ // decode the image and convert colorspace to RGB, saved as 24bit interleaved
+ error_code = heif_decode_image(handle, &img, heif_colorspace_RGB, heif_chroma_interleaved_24bit, nullptr);
+ if (error_code.code)
+ {
+ log_printf("warning: heif reader error: %s\n", error_code.message);
+ heif_context_free(ctx);
+ return FALSE;
+ }
- data = heif_image_get_plane(img, heif_channel_interleaved, &stride);
+ data = heif_image_get_plane(img, heif_channel_interleaved, &stride);
- height = heif_image_get_height(img,heif_channel_interleaved);
- width = heif_image_get_width(img,heif_channel_interleaved);
- alpha = heif_image_handle_has_alpha_channel(handle);
- heif_image_handle_release(handle);
+ height = heif_image_get_height(img,heif_channel_interleaved);
+ width = heif_image_get_width(img,heif_channel_interleaved);
+ alpha = heif_image_handle_has_alpha_channel(handle);
+ heif_image_handle_release(handle);
- ld->pixbuf = gdk_pixbuf_new_from_data(data, GDK_COLORSPACE_RGB, alpha, 8, width, height, stride, free_buffer, img);
+ ld->pixbuf = gdk_pixbuf_new_from_data(data, GDK_COLORSPACE_RGB, alpha, 8, width, height, stride, free_buffer, img);
- ld->area_updated_cb(loader, 0, 0, width, height, ld->data);
- }
+ ld->area_updated_cb(loader, 0, 0, width, height, ld->data);
heif_context_free(ctx);
return FALSE;
}
}
- if (*size < context->bytes_to_skip) {
+
+ if (*size < context->bytes_to_skip)
+ {
*data += *size;
context->bytes_to_skip -= *size;
*size = 0;
return FALSE;
- } else {
- *size -= context->bytes_to_skip;
- *data += context->bytes_to_skip;
- return TRUE;
- }
+ }
+
+ *size -= context->bytes_to_skip;
+ *data += context->bytes_to_skip;
+ return TRUE;
}
/*
{
guint16 bytes_read = 0;
int k;
- while (bytes_read < line_length) {
+ while (bytes_read < line_length)
+ {
gchar byte = src[bytes_read];
++bytes_read;
- if (byte == -128) {
+ if (byte == -128)
+ {
continue;
- } else if (byte > -1) {
+ }
+
+ if (byte > -1)
+ {
gint count = byte + 1;
/* copy next count bytes */
- for (k = 0; k < count; ++k) {
+ for (k = 0; k < count; ++k)
+ {
*dest = src[bytes_read];
++dest;
++bytes_read;
+ }
}
- } else {
+ else
+ {
gint count = -byte + 1;
/* copy next byte count times */
guchar next_byte = src[bytes_read];
++bytes_read;
- for (k = 0; k < count; ++k) {
+ for (k = 0; k < count; ++k)
+ {
*dest = next_byte;
++dest;
+ }
}
}
- }
}
static void
DEBUG_1("Failed to open TIFF image");
return FALSE;
}
- else
- {
- do
- {
- dircount++;
- } while (TIFFReadDirectory(tiff));
- lt->page_total = dircount;
- }
+
+ do {
+ dircount++;
+ } while (TIFFReadDirectory(tiff));
+
+ lt->page_total = dircount;
if (!TIFFSetDirectory(tiff, lt->page_num))
{
image_osd_set(imd, static_cast<OsdShowFlags>(OSD_SHOW_INFO | OSD_SHOW_STATUS));
return;
}
+
+ if (show & OSD_SHOW_HISTOGRAM)
+ {
+ image_osd_set(imd, OSD_SHOW_NOTHING);
+ }
else
{
- if (show & OSD_SHOW_HISTOGRAM)
- {
- image_osd_set(imd, OSD_SHOW_NOTHING);
- }
- else
- {
- image_osd_set(imd, static_cast<OsdShowFlags>(show | OSD_SHOW_HISTOGRAM));
- }
+ image_osd_set(imd, static_cast<OsdShowFlags>(show | OSD_SHOW_HISTOGRAM));
}
}
imd->read_ahead_fd = nullptr;
return TRUE;
}
- else if (imd->read_ahead_fd->pixbuf)
+ if (imd->read_ahead_fd->pixbuf)
{
image_change_pixbuf(imd, imd->read_ahead_fd->pixbuf, image_zoom_get(imd), FALSE);
}
return TRUE;
}
- else
- {
- imd->func_scroll(imd, event, imd->data_scroll);
- return TRUE;
- }
+
+ imd->func_scroll(imd, event, imd->data_scroll);
+ return TRUE;
}
return FALSE;
if (bo == TIFF_BYTE_ORDER_INTEL)
return GUINT16_FROM_LE(align_buf);
- else
- return GUINT16_FROM_BE(align_buf);
+
+ return GUINT16_FROM_BE(align_buf);
}
guint32 tiff_byte_get_int32(const guchar *f, TiffByteOrder bo)
if (bo == TIFF_BYTE_ORDER_INTEL)
return GUINT32_FROM_LE(align_buf);
- else
- return GUINT32_FROM_BE(align_buf);
+
+ return GUINT32_FROM_BE(align_buf);
}
#pragma GCC diagnostic push
return;
}
- else if (lw->tools)
+
+ if (lw->tools)
{
layout_tools_geometry_sync(lw);
gq_gtk_widget_destroy(lw->tools);
lua_pushnumber(L, datetime);
return 1;
}
- else
- {
- lua_pushnil(L);
- return 1;
- }
+
+ lua_pushnil(L);
+ return 1;
}
- else if (strcmp(key, "Exif.Photo.DateTimeDigitized") == 0)
+
+ if (strcmp(key, "Exif.Photo.DateTimeDigitized") == 0)
{
memset(&tm, 0, sizeof(tm));
if (value && strptime(value, "%Y:%m:%d %H:%M:%S", &tm))
lua_pushnumber(L, datetime);
return 1;
}
- else
- {
- lua_pushnil(L);
- return 1;
- }
+
+ lua_pushnil(L);
+ return 1;
}
lua_pushstring(L, value);
return 1;
{
return metadata_write_string(fd, key, value);
}
- else
- {
- gchar *new_string = g_strconcat(str, value, NULL);
- gboolean ret = metadata_write_string(fd, key, new_string);
- g_free(str);
- g_free(new_string);
- return ret;
- }
+
+ gchar *new_string = g_strconcat(str, value, NULL);
+ gboolean ret = metadata_write_string(fd, key, new_string);
+ g_free(str);
+ g_free(new_string);
+ return ret;
}
gboolean metadata_write_GPS_coord(FileData *fd, const gchar *key, gdouble value)
{
return metadata_write_list(fd, key, values);
}
- else
- {
- gboolean ret;
- list = g_list_concat(list, string_list_copy(values));
- list = remove_duplicate_strings_from_list(list);
- ret = metadata_write_list(fd, key, list);
- g_list_free_full(list, g_free);
- return ret;
- }
+ gboolean ret;
+ list = g_list_concat(list, string_list_copy(values));
+ list = remove_duplicate_strings_from_list(list);
+
+ ret = metadata_write_list(fd, key, list);
+ g_list_free_full(list, g_free);
+ return ret;
}
/**
{
if (options->metadata.keywords_case_sensitive)
return find_string_in_list_utf8case(list, string);
- else
- return find_string_in_list_utf8nocase(list, string);
+
+ return find_string_in_list_utf8nocase(list, string);
}
#define KEYWORDS_SEPARATOR(c) ((c) == ',' || (c) == ';' || (c) == '\n' || (c) == '\r' || (c) == '\b')
{
return keyword_compare(keyword_tree, &parent_a, &parent_b) == 0;
}
- else
- {
- return (!valid_pa && !valid_pb); /* both are toplevel */
- }
+
+ return (!valid_pa && !valid_pb); /* both are toplevel */
}
gboolean keyword_exists(GtkTreeModel *keyword_tree, GtkTreeIter *parent_ptr, GtkTreeIter *sibling, const gchar *name, gboolean exclude_sibling, GtkTreeIter *result)
if (slash)
return g_build_filename(home, G_DIR_SEPARATOR_S, slash + 1, NULL);
- else
- return g_build_filename(home, G_DIR_SEPARATOR_S, NULL);
+
+ return g_build_filename(home, G_DIR_SEPARATOR_S, NULL);
#endif
}
g_hash_table_insert(vars, const_cast<gchar *>(keyword), const_cast<gchar *>(value));
return;
}
- else
- {
- g_hash_table_insert(vars, const_cast<gchar *>(keyword), g_strdup(value));
- }
+
+ g_hash_table_insert(vars, const_cast<gchar *>(keyword), g_strdup(value));
if (flags & OSDT_FREE) g_free(const_cast<gchar *>(value));
}
}
return FALSE;
}
- else
- {
- // regex compile failed; fall back to exact string match.
- GList *found_elem = g_list_find_custom(haystack, filter->keyword, reinterpret_cast<GCompareFunc>(g_strcmp0));
- if (found_elem && found_kw) *found_kw = static_cast<gchar *>(found_elem->data);
- return !!found_elem;
- }
+
+ // regex compile failed; fall back to exact string match.
+ GList *found_elem = g_list_find_custom(haystack, filter->keyword, reinterpret_cast<GCompareFunc>(g_strcmp0));
+ if (found_elem && found_kw) *found_kw = static_cast<gchar *>(found_elem->data);
+ return !!found_elem;
}
gboolean pan_filter_fd_list(GList **fd_list, GList *filter_elements, gint filter_classes)
return (G_SOURCE_CONTINUE);
}
- else if (kfd->list_dir)
+
+ if (kfd->list_dir)
{
FileData *fd;
{
return TRUE;
}
- else
- {
- return FALSE;
- }
+
+ return FALSE;
}
gchar *form_image_text(const gchar *template_string, FileData *fd, PrintWindow *pw, gint page_nr, gint total)
if (offset) *offset = text + strlen(remote_commands[i].opt_s);
return &remote_commands[i];
}
- else if (remote_commands[i].opt_l &&
+
+ if (remote_commands[i].opt_l &&
strncmp(remote_commands[i].opt_l, text, strlen(remote_commands[i].opt_l)) == 0)
{
if (offset) *offset = text + strlen(remote_commands[i].opt_l);
rt_queue(rt, 0, 0, pr->width, pr->height, TRUE, TILE_RENDER_ALL, FALSE, FALSE);
return;
}
- else
- {
+
gint x1, y1;
gint x2, y2;
cairo_t *cr;
rt->x_scroll, y_off > 0 ? rt->y_scroll + (pr->vis_height - h) : rt->y_scroll,
pr->vis_width, h, TRUE, TILE_RENDER_ALL, FALSE, FALSE);
}
- }
}
static void renderer_area_changed(void *renderer, gint src_x, gint src_y, gint src_w, gint src_h)
{
return TRUE;
}
- else
- {
- image_loader_free(sd->img_loader);
- sd->img_loader = nullptr;
- }
+
+ image_loader_free(sd->img_loader);
+ sd->img_loader = nullptr;
}
}
{
if (g_list_length(ss->cd->list) == ss->slide_count)
return TRUE;
- else
- return FALSE;
+
+ return FALSE;
}
dir_fd = ss->lw->dir_fd;
s = p;
continue;
}
- else if (path[p] == '.' && (path[p+1] == G_DIR_SEPARATOR || path[p+1] == '\0'))
+
+ if (path[p] == '.' && (path[p+1] == G_DIR_SEPARATOR || path[p+1] == '\0'))
{
/* /../ or /.., remove previous part, ie. /a/b/../ becomes /a/ */
s = p + 1;
return gtk_text_buffer_get_text(buffer, &start, &end, FALSE);
}
- else if (GTK_IS_ENTRY(text_widget))
+
+ if (GTK_IS_ENTRY(text_widget))
{
return g_strdup(gq_gtk_entry_get_text(GTK_ENTRY(text_widget)));
}
- else
- {
- return nullptr;
- }
+
+ return nullptr;
+
}
return gtk_text_buffer_get_text(buffer, &start, &end, FALSE);
}
- else if (GTK_IS_ENTRY(text_widget))
+
+ if (GTK_IS_ENTRY(text_widget))
{
return g_strdup(gq_gtk_entry_get_text(GTK_ENTRY(text_widget)));
}
- else
- {
- return nullptr;
- }
+
+ return nullptr;
+
}
static gint simple_sort_cb(gconstpointer a, gconstpointer b)
g_free(entry_dir);
return home_exp;
}
- else
- {
- gchar *buf = g_strconcat(entry_dir, G_DIR_SEPARATOR_S, NULL);
- gq_gtk_entry_set_text(GTK_ENTRY(td->entry), buf);
- gtk_editable_set_position(GTK_EDITABLE(td->entry), strlen(buf));
- g_free(buf);
- g_free(entry_dir);
- return TRUE;
- }
+
+ gchar *buf = g_strconcat(entry_dir, G_DIR_SEPARATOR_S, NULL);
+ gq_gtk_entry_set_text(GTK_ENTRY(td->entry), buf);
+ gtk_editable_set_position(GTK_EDITABLE(td->entry), strlen(buf));
+ g_free(buf);
+ g_free(entry_dir);
+ return TRUE;
}
ptr = const_cast<gchar *>(filename_from_path(entry_dir));
g_free(entry_dir);
return TRUE;
}
- else
- {
- gsize c = strlen(entry_file);
- gboolean done = FALSE;
- auto test_file = static_cast<gchar *>(poss->data);
- while (!done)
+ gsize c = strlen(entry_file);
+ gboolean done = FALSE;
+ auto test_file = static_cast<gchar *>(poss->data);
+
+ while (!done)
+ {
+ list = poss;
+ if (!list) done = TRUE;
+ while (list && !done)
{
- list = poss;
- if (!list) done = TRUE;
- while (list && !done)
+ auto file = static_cast<gchar *>(list->data);
+ if (strlen(file) < c || strncmp(test_file, file, c) != 0)
{
- auto file = static_cast<gchar *>(list->data);
- if (strlen(file) < c || strncmp(test_file, file, c) != 0)
- {
- done = TRUE;
- }
- list = list->next;
+ done = TRUE;
}
- c++;
+ list = list->next;
}
- c -= 2;
- if (c > 0)
- {
- gchar *file;
- gchar *buf;
- file = g_strdup(test_file);
- file[c] = '\0';
- buf = g_build_filename(entry_dir, file, NULL);
- gq_gtk_entry_set_text(GTK_ENTRY(td->entry), buf);
- gtk_editable_set_position(GTK_EDITABLE(td->entry), strlen(buf));
+ c++;
+ }
+ c -= 2;
+ if (c > 0)
+ {
+ gchar *file;
+ gchar *buf;
+ file = g_strdup(test_file);
+ file[c] = '\0';
+ buf = g_build_filename(entry_dir, file, NULL);
+ gq_gtk_entry_set_text(GTK_ENTRY(td->entry), buf);
+ gtk_editable_set_position(GTK_EDITABLE(td->entry), strlen(buf));
#ifdef TAB_COMPLETION_ENABLE_POPUP_MENU
- poss = g_list_sort(poss, simple_sort);
- tab_completion_popup_list(td, poss);
+ poss = g_list_sort(poss, simple_sort);
+ tab_completion_popup_list(td, poss);
#endif
- g_free(file);
- g_free(buf);
- g_list_free(poss);
- g_free(entry_dir);
- return TRUE;
- }
+ g_free(file);
+ g_free(buf);
+ g_list_free(poss);
+ g_free(entry_dir);
+ return TRUE;
}
+
g_list_free(poss);
}
}
{
return strcmp(nda->fd->collate_key_name_natural, ndb->fd->collate_key_name_natural);
}
- else
- {
- return strcmp(nda->fd->collate_key_name_nocase_natural, ndb->fd->collate_key_name_nocase_natural);
- }
+
+ return strcmp(nda->fd->collate_key_name_nocase_natural, ndb->fd->collate_key_name_nocase_natural);
}
- else if (vd->layout->options.dir_view_list_sort.method == SORT_TIME)
+
+ if (vd->layout->options.dir_view_list_sort.method == SORT_TIME)
{
if (nda->fd->date < ndb->fd->date) return -1;
if (nda->fd->date > ndb->fd->date) return 1;
return 0;
}
- else
+
+ if (vd->layout->options.dir_view_list_sort.case_sensitive == TRUE)
{
- if (vd->layout->options.dir_view_list_sort.case_sensitive == TRUE)
- {
- return strcmp(nda->fd->collate_key_name, ndb->fd->collate_key_name);
- }
- else
- {
- return strcmp(nda->fd->collate_key_name_nocase, ndb->fd->collate_key_name_nocase);
- }
+ return strcmp(nda->fd->collate_key_name, ndb->fd->collate_key_name);
}
+
+ return strcmp(nda->fd->collate_key_name_nocase, ndb->fd->collate_key_name_nocase);
}
/*
gdk_drag_status(context, GDK_ACTION_DEFAULT, time);
return TRUE;
}
- else
- {
- gdk_drag_status(context, gdk_drag_context_get_suggested_action(context), time);
- }
+
+ gdk_drag_status(context, gdk_drag_context_get_suggested_action(context), time);
vd_dnd_drop_update(vd, x, y);
{
return G_SOURCE_CONTINUE;
}
- else
- {
- vf->stars_filedata = nullptr;
- vf->stars_id = 0;
- return G_SOURCE_REMOVE;
- }
+
+ vf->stars_filedata = nullptr;
+ vf->stars_id = 0;
+ return G_SOURCE_REMOVE;
}
return G_SOURCE_REMOVE;
int result = ZDReaderGetPoint(&reader, &pointLat, &pointLon);
if(result < 0) {
return ZD_LOOKUP_PARSE_ERROR;
- } else if(result == 0) {
+ } if(result == 0) {
break;
}
if(winding == -4) {
return ZD_LOOKUP_IN_ZONE;
- } else if(winding == 4) {
+ } if(winding == 4) {
return ZD_LOOKUP_IN_EXCLUDED_ZONE;
- } else if(winding == 0) {
+ } if(winding == 0) {
return ZD_LOOKUP_NOT_IN_ZONE;
}
const ZDLookupResult lookupResult = ZDPointInPolygon(library, library->dataOffset + polygonIndex, latFixedPoint, lonFixedPoint, (safezone) ? &distanceSqrMin : nullptr);
if(lookupResult == ZD_LOOKUP_PARSE_ERROR) {
break;
- } else if(lookupResult != ZD_LOOKUP_NOT_IN_ZONE) {
+ } if(lookupResult != ZD_LOOKUP_NOT_IN_ZONE) {
auto newResults = static_cast<ZoneDetectResult *>(realloc(results, sizeof(ZoneDetectResult) * (numResults + 2)));
if(newResults) {