Fix shadowing variables in labmdas

GCC generates warnings about these, although the variable being shadowed is not captured by the lambda.
This commit is contained in:
Pokechu22
2022-01-16 21:30:53 -08:00
parent 0e23dfbb25
commit a6d516dc94
2 changed files with 18 additions and 16 deletions

View File

@ -207,10 +207,10 @@ void RiivolutionBootWidget::MakeGUIForParsedFile(std::string path, std::string r
connect(selection, qOverload<int>(&QComboBox::currentIndexChanged), this,
[this, selection](int idx) {
const auto gui_index = selection->currentData().value<GuiRiivolutionPatchIndex>();
auto& disc = m_discs[gui_index.m_disc_index].disc;
auto& section = disc.m_sections[gui_index.m_section_index];
auto& option = section.m_options[gui_index.m_option_index];
option.m_selected_choice = static_cast<u32>(gui_index.m_choice_index);
auto& selected_disc = m_discs[gui_index.m_disc_index].disc;
auto& selected_section = selected_disc.m_sections[gui_index.m_section_index];
auto& selected_option = selected_section.m_options[gui_index.m_option_index];
selected_option.m_selected_choice = static_cast<u32>(gui_index.m_choice_index);
});
grid_layout->addWidget(label, row, 0, 1, 1);