Skip to content

Commit 47df20f

Browse files
committed
Use pre-fix increment
1 parent a682783 commit 47df20f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/View/Sidebar/BookmarkListBox.vala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,10 @@ public class Sidebar.BookmarkListBox : Gtk.Box, Sidebar.SidebarListInterface {
196196

197197
int pinned = 0; // Assume pinned items only at start and end of list
198198
int index = 0;
199-
Gtk.ListBoxRow? row = list_box.get_row_at_index (index++);
199+
Gtk.ListBoxRow? row = list_box.get_row_at_index (index);
200200
while (row != null && ((BookmarkRow) row).pinned) {
201201
pinned++;
202-
row = list_box.get_row_at_index (index++);
202+
row = list_box.get_row_at_index (++index);
203203
}
204204

205205
if (pos < pinned) {
@@ -218,7 +218,7 @@ public class Sidebar.BookmarkListBox : Gtk.Box, Sidebar.SidebarListInterface {
218218
public override bool remove_item_by_id (uint32 id) {
219219
bool removed = false;
220220
int index = 0;
221-
Gtk.ListBoxRow? row = list_box.get_row_at_index (index++);
221+
Gtk.ListBoxRow? row = list_box.get_row_at_index (index);
222222
while (row != null) {
223223
if (row is BookmarkRow) {
224224
unowned var bm = (BookmarkRow)row;
@@ -230,7 +230,7 @@ public class Sidebar.BookmarkListBox : Gtk.Box, Sidebar.SidebarListInterface {
230230
}
231231
}
232232

233-
row = list_box.get_row_at_index (index++);
233+
row = list_box.get_row_at_index (++index);
234234
}
235235

236236
return removed;

0 commit comments

Comments
 (0)