diff src/gui/widgets/sidebar.cc @ 252:a0eeb2cc7e6d

*: resolve make distcheck failures
author Paper <paper@paper.us.eu.org>
date Tue, 06 Feb 2024 02:24:49 -0500
parents c130f47f6f48
children 862d0d8619f6
line wrap: on
line diff
--- a/src/gui/widgets/sidebar.cc	Sun Feb 04 21:18:23 2024 -0500
+++ b/src/gui/widgets/sidebar.cc	Tue Feb 06 02:24:49 2024 -0500
@@ -4,8 +4,6 @@
 #include <QListWidgetItem>
 #include <QMouseEvent>
 
-#include <iostream>
-
 SideBar::SideBar(QWidget* parent) : QListWidget(parent) {
 	setFrameShape(QFrame::NoFrame);
 	setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
@@ -69,10 +67,10 @@
 }
 
 int SideBar::AddSeparatorsToIndex(int index) {
-	int i = 0, separators = 0, items = 0;
+	int separators = 0, items = 0;
 
 	for (; items <= index; ) {
-		if (IndexIsSeparator(indexFromItem(item(i++)))) {
+		if (IndexIsSeparator(indexFromItem(item(items + separators)))) {
 			separators++;
 		} else {
 			items++;