-modernize-avoid-c-arrays,
-modernize-macro-to-enum,
-modernize-raw-string-literal,
- -modernize-use-auto,
-modernize-use-trailing-return-type,
-performance-no-int-to-ptr,
-readability-braces-around-statements,
#pragma GCC diagnostic ignored "-Wunused-function"
static void bar_pane_exif_size_request_unused(GtkWidget *, GtkRequisition *requisition, gpointer data)
{
- PaneExifData *ped = static_cast<PaneExifData *>(data);
+ auto *ped = static_cast<PaneExifData *>(data);
if (requisition->height < ped->min_height)
{
requisition->height = ped->min_height;
#pragma GCC diagnostic ignored "-Wunused-function"
static gboolean color_man_idle_cb_unused(gpointer data)
{
- ColorMan *cm = static_cast<ColorMan *>(data);
+ auto *cm = static_cast<ColorMan *>(data);
gint width, height;
gint rh;
{
while (work)
{
- DupeItem *di = static_cast<DupeItem *>(work->data);
+ auto *di = static_cast<DupeItem *>(work->data);
if (di->fd == fd) return di;
{
while (work)
{
- DupeItem *di = static_cast<DupeItem *>(work->data);
+ auto *di = static_cast<DupeItem *>(work->data);
if (strcmp(di->fd->path, path) == 0) return di;
#pragma GCC diagnostic ignored "-Wunused-function"
const gchar *editor_get_name_unused(const gchar *key)
{
- EditorDescription *editor = static_cast<EditorDescription *>(g_hash_table_lookup(editors, key));
+ auto *editor = static_cast<EditorDescription *>(g_hash_table_lookup(editors, key));
if (!editor) return nullptr;
// Let's not touch data_len until we finish copy.
// Just in case we run into OOM.
size_t img_sz = image.size();
- Exiv2::byte* b = new Exiv2::byte[img_sz];
+ auto* b = new Exiv2::byte[img_sz];
std::copy_n(image.pData(), img_sz, b);
*data_len = img_sz;
return b;
while (files)
{
- FileData *file = static_cast<FileData *>(files->data);
+ auto *file = static_cast<FileData *>(files->data);
read_exif_time_data(file);
files = files->next;
while (files)
{
- FileData *file = static_cast<FileData *>(files->data);
+ auto *file = static_cast<FileData *>(files->data);
read_exif_time_digitized_data(file);
files = files->next;
while (files)
{
- FileData *file = static_cast<FileData *>(files->data);
+ auto *file = static_cast<FileData *>(files->data);
rating_str = metadata_read_string(file, RATING_KEY, METADATA_PLAIN);
if (rating_str )
{
#pragma GCC diagnostic ignored "-Wunused-function"
gboolean file_data_send_notification_idle_cb_unused(gpointer data)
{
- NotifyIdleData *nid = (NotifyIdleData *)data;
+ auto *nid = (NotifyIdleData *)data;
GList *work = notify_func_list;
while (work)
{
- NotifyData *nd = (NotifyData *)work->data;
+ auto *nd = (NotifyData *)work->data;
nd->func(nid->fd, nid->type, nd->data);
work = work->next;
static gboolean image_loader_webp_load(gpointer loader, const guchar *buf, gsize count, GError **)
{
- ImageLoaderWEBP *ld = (ImageLoaderWEBP *) loader;
+ auto *ld = (ImageLoaderWEBP *) loader;
guint8* data;
gint width, height;
gboolean res_info;
static gpointer image_loader_webp_new(ImageLoaderBackendCbAreaUpdated area_updated_cb, ImageLoaderBackendCbSize size_cb, ImageLoaderBackendCbAreaPrepared area_prepared_cb, gpointer data)
{
- ImageLoaderWEBP *loader = g_new0(ImageLoaderWEBP, 1);
+ auto *loader = g_new0(ImageLoaderWEBP, 1);
loader->area_updated_cb = area_updated_cb;
loader->size_cb = size_cb;
loader->area_prepared_cb = area_prepared_cb;
static void image_loader_webp_set_size(gpointer loader, int width, int height)
{
- ImageLoaderWEBP *ld = (ImageLoaderWEBP *) loader;
+ auto *ld = (ImageLoaderWEBP *) loader;
ld->requested_width = width;
ld->requested_height = height;
}
static GdkPixbuf* image_loader_webp_get_pixbuf(gpointer loader)
{
- ImageLoaderWEBP *ld = (ImageLoaderWEBP *) loader;
+ auto *ld = (ImageLoaderWEBP *) loader;
return ld->pixbuf;
}
static void image_loader_webp_abort(gpointer loader)
{
- ImageLoaderWEBP *ld = (ImageLoaderWEBP *) loader;
+ auto *ld = (ImageLoaderWEBP *) loader;
ld->abort = TRUE;
}
static void image_loader_webp_free(gpointer loader)
{
- ImageLoaderWEBP *ld = (ImageLoaderWEBP *) loader;
+ auto *ld = (ImageLoaderWEBP *) loader;
if (ld->pixbuf) g_object_unref(ld->pixbuf);
g_free(ld);
}
work = list;
while (work)
{
- FileData *fd = static_cast<FileData *>(work->data);
+ auto *fd = static_cast<FileData *>(work->data);
work = work->next;
ret = ret && metadata_write_queue_remove(fd);
}
#pragma GCC diagnostic ignored "-Wunused-function"
static void pref_checkbox_link_sensitivity_swap_cb_unused(GtkWidget *button, gpointer data)
{
- GtkWidget *widget = static_cast<GtkWidget *>(data);
+ auto *widget = static_cast<GtkWidget *>(data);
gtk_widget_set_sensitive(widget, !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button)));
}
static void pref_radiobutton_int_cb_unused(GtkWidget *widget, gpointer data)
{
- gboolean *result = static_cast<gboolean *>(data);
+ auto *result = static_cast<gboolean *>(data);
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)))
{
void path_selection_sync_to_entry_unused(GtkWidget *entry)
{
- Dest_Data *dd = static_cast<Dest_Data *>(g_object_get_data(G_OBJECT(entry), "destination_data"));
+ auto *dd = static_cast<Dest_Data *>(g_object_get_data(G_OBJECT(entry), "destination_data"));
const gchar *path;
if (!dd) return;
#pragma GCC diagnostic ignored "-Wunused-function"
void vd_menu_position_cb_unused(GtkMenu *menu, gint *x, gint *y, gboolean *, gpointer data)
{
- ViewDir *vd = static_cast<ViewDir *>(data);
+ auto *vd = static_cast<ViewDir *>(data);
GtkTreeModel *store;
GtkTreeIter iter;
GtkTreePath *tpath;
#pragma GCC diagnostic ignored "-Wunused-function"
gboolean vficon_index_is_selected_unused(ViewFile *vf, gint row)
{
- FileData *fd = static_cast<FileData *>(g_list_nth_data(vf->list, row));
+ auto *fd = static_cast<FileData *>(g_list_nth_data(vf->list, row));
if (!fd) return FALSE;