mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 21:07: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:
@@ -79,10 +79,10 @@ void CPauseScreen::InitializeFrameGlue() {
|
||||
deco->SetColor(color);
|
||||
}
|
||||
|
||||
x34_loadedPauseScreenInstructions->SetMouseDownCallback(std::bind(&CPauseScreen::OnWidgetMouseDown, this,
|
||||
std::placeholders::_1, std::placeholders::_2));
|
||||
x34_loadedPauseScreenInstructions->SetMouseUpCallback(std::bind(&CPauseScreen::OnWidgetMouseUp, this,
|
||||
std::placeholders::_1, std::placeholders::_2));
|
||||
x34_loadedPauseScreenInstructions->SetMouseDownCallback(
|
||||
[this](CGuiWidget* caller, bool resume) { OnWidgetMouseDown(caller, resume); });
|
||||
x34_loadedPauseScreenInstructions->SetMouseUpCallback(
|
||||
[this](CGuiWidget* caller, bool cancel) { OnWidgetMouseUp(caller, cancel); });
|
||||
}
|
||||
|
||||
bool CPauseScreen::CheckLoadComplete(const CStateManager& mgr) {
|
||||
|
||||
Reference in New Issue
Block a user