Address compiler warning

This commit is contained in:
Alexander Montag 2024-10-02 13:20:06 +02:00
parent ec6c4c3036
commit b7b6312184
No known key found for this signature in database
GPG Key ID: 07FE50B35A2B7524
1 changed files with 2 additions and 2 deletions

View File

@ -373,7 +373,7 @@ void TreeSearch::_select_previous_match() {
return;
}
// find [selected_idx] among ordered_tree_items
int selected_idx;
int selected_idx = 0;
for (int i = ordered_tree_items.size() - 1; i >= 0; i--) {
if (ordered_tree_items[i] == selected) {
selected_idx = i;
@ -404,7 +404,7 @@ void TreeSearch::_select_next_match() {
}
// find [selected_idx] among ordered_tree_items
int selected_idx;
int selected_idx = 0;
for (int i = 0; i < ordered_tree_items.size(); i++) {
if (ordered_tree_items[i] == selected) {
selected_idx = i;