2
0
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:
Lioncash
2019-08-14 03:45:28 -04:00
parent cf294db9eb
commit 8b7945e76f
8 changed files with 70 additions and 77 deletions

View File

@@ -101,9 +101,9 @@ bool CSaveGameScreen::PumpLoad() {
x64_textpane_choice2 = static_cast<CGuiTextPane*>(x50_loadedFrame->FindWidget("textpane_choice2"));
x68_textpane_choice3 = static_cast<CGuiTextPane*>(x50_loadedFrame->FindWidget("textpane_choice3"));
x58_tablegroup_choices->SetMenuAdvanceCallback(std::bind(&CSaveGameScreen::DoAdvance, this, std::placeholders::_1));
x58_tablegroup_choices->SetMenuAdvanceCallback([this](CGuiTableGroup* caller) { DoAdvance(caller); });
x58_tablegroup_choices->SetMenuSelectionChangeCallback(
std::bind(&CSaveGameScreen::DoSelectionChange, this, std::placeholders::_1, std::placeholders::_2));
[this](CGuiTableGroup* caller, int oldSel) { DoSelectionChange(caller, oldSel); });
if (x0_saveCtx == ESaveContext::InGame)
x6c_cardDriver->StartCardProbe();