2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 06:27:43 +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

@@ -141,10 +141,10 @@ void CGBASupport::Update(float dt) {
case EPhase::StartJoyBusBoot:
x34_phase = EPhase::PollJoyBusBoot;
if (!g_JbusEndpoint || g_JbusEndpoint->GBAJoyBootAsync(
x40_siChan * 2, 2, x2c_buffer.get(), x28_fileSize, &x3c_status,
std::bind(JoyBootDone, std::placeholders::_1, std::placeholders::_2)) != jbus::GBA_READY)
if (!g_JbusEndpoint || g_JbusEndpoint->GBAJoyBootAsync(x40_siChan * 2, 2, x2c_buffer.get(), x28_fileSize,
&x3c_status, JoyBootDone) != jbus::GBA_READY) {
x34_phase = EPhase::Failed;
}
break;
case EPhase::PollJoyBusBoot: