mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 23:47:42 +00:00
MP1: Migrate from std::bind to lambdas
Provides a more straightforward means of supplying custom behavior in place. Lambdas also typically optimize better compared to std::bind objects.
This commit is contained in:
@@ -207,11 +207,11 @@ void COptionsScreen::VActivate() {
|
||||
.SetText(xc_pauseStrg.GetString(98));
|
||||
|
||||
x18c_slidergroup_slider->SetSelectionChangedCallback(
|
||||
std::bind(&COptionsScreen::OnSliderChanged, this, std::placeholders::_1, std::placeholders::_2));
|
||||
[this](CGuiSliderGroup* caller, float value) { OnSliderChanged(caller, value); });
|
||||
x190_tablegroup_double->SetMenuSelectionChangeCallback(
|
||||
std::bind(&COptionsScreen::OnEnumChanged, this, std::placeholders::_1, std::placeholders::_2));
|
||||
[this](CGuiTableGroup* caller, int oldSel) { OnEnumChanged(caller, oldSel); });
|
||||
x194_tablegroup_triple->SetMenuSelectionChangeCallback(
|
||||
std::bind(&COptionsScreen::OnEnumChanged, this, std::placeholders::_1, std::placeholders::_2));
|
||||
[this](CGuiTableGroup* caller, int oldSel) { OnEnumChanged(caller, oldSel); });
|
||||
}
|
||||
|
||||
void COptionsScreen::RightTableSelectionChanged(int oldSel, int newSel) { UpdateOptionView(); }
|
||||
|
||||
Reference in New Issue
Block a user