Skip to content

Commit e95d2f6

Browse files
committed
Clang-Tidy auto-fixes
Auto-fixes made by locally installed clang-tidy: Ubuntu LLVM version 20.1.8 Optimized build. Generated via ./tools/clang-tidy-check.sh --fix --all These errors do not show in tests on GitHub, which is running Ubuntu 24.04. That will soon be updated to Ubuntu 26.04, when possibly these errors would have been triggered.
1 parent 82cd5f8 commit e95d2f6

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/pan-view/pan-item.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ static bool pan_item_text_draw(const PanItem *pi, GdkPixbuf *pixbuf, GdkRectangl
402402

403403
PanItem *pan_item_thumb_new(PanWindow *pw, FileData *fd, gint x, gint y)
404404
{
405-
const gint size = pw->thumb_size + PAN_SHADOW_OFFSET * 2;
405+
const gint size = pw->thumb_size + (PAN_SHADOW_OFFSET * 2);
406406

407407
PanItem *pi = pan_item_new(PAN_ITEM_THUMB, x, y, size, size);
408408

src/pixbuf-util.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -628,8 +628,8 @@ static void pixbuf_copy_font(GdkPixbuf *src, gint sx, gint sy,
628628

629629
for (gint i = 0; i < h; i++)
630630
{
631-
guchar *sp = s_pix + (sy + i) * srs + sx * s_step;
632-
guchar *dp = d_pix + (dy + i) * drs + dx * d_step;
631+
guchar *sp = s_pix + ((sy + i) * srs) + (sx * s_step);
632+
guchar *dp = d_pix + ((dy + i) * drs) + (dx * d_step);
633633
for (gint j = 0; j < w; j++)
634634
{
635635
if (*sp)

src/view-file/view-file.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,7 +1101,7 @@ static gboolean vf_file_filter_rating_cb(GtkWidget *widget, gpointer data)
11011101
}
11021102
}
11031103

1104-
options->rating_filter = state ? (options->rating_filter | (1u << i)) : (options->rating_filter & ~(1u << i));
1104+
options->rating_filter = state ? (options->rating_filter | (1U << i)) : (options->rating_filter & ~(1U << i));
11051105

11061106
vf_refresh(vf);
11071107

@@ -1207,7 +1207,7 @@ static GtkWidget *rating_filter_menu(ViewFile *vf)
12071207
for (int i = 0; i < FORMAT_RATING_COUNT; i++)
12081208
{
12091209
GtkWidget *menu_item = gtk_check_menu_item_new_with_label(format_rating_list[i]);
1210-
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu_item), (options->rating_filter & (1u << i)));
1210+
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu_item), (options->rating_filter & (1U << i)));
12111211
g_signal_connect(G_OBJECT(menu_item), "toggled", G_CALLBACK(vf_file_filter_rating_cb), vf);
12121212
gtk_menu_shell_append(GTK_MENU_SHELL (menu), menu_item);
12131213
gtk_widget_show(menu_item);

0 commit comments

Comments
 (0)