Skip to content

Commit

Permalink
Fix shadowing local variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Vankata453 committed Aug 7, 2023
1 parent 26b5821 commit 8a6a2f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/editor/object_option.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -814,8 +814,8 @@ DirectionOption::add_to_menu(Menu& menu) const
}

menu.add_string_select(-1, get_text(), selected, labels)
.set_callback([value_ptr = m_value_ptr, possible_directions = m_possible_directions](int selected) {
*value_ptr = possible_directions.at(selected);
.set_callback([value_ptr = m_value_ptr, possible_directions = m_possible_directions](int index) {
*value_ptr = possible_directions.at(index);
});
}

Expand Down

0 comments on commit 8a6a2f3

Please sign in to comment.