From 84ae0c1c7e43a2517a01f7e8a6cbc037277c6fc1 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 12 Dec 2023 13:25:26 -0500 Subject: [PATCH] ActionReplay: Make use of std::erase_if --- Source/Core/Core/ActionReplay.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Source/Core/Core/ActionReplay.cpp b/Source/Core/Core/ActionReplay.cpp index c3004cf148..b0fac62621 100644 --- a/Source/Core/Core/ActionReplay.cpp +++ b/Source/Core/Core/ActionReplay.cpp @@ -997,13 +997,11 @@ void RunAllActive(const Core::CPUThreadGuard& cpu_guard) // are only atomic ops unless contested. It should be rare for this to // be contested. std::lock_guard guard(s_lock); - s_active_codes.erase(std::remove_if(s_active_codes.begin(), s_active_codes.end(), - [&cpu_guard](const ARCode& code) { - bool success = RunCodeLocked(cpu_guard, code); - LogInfo("\n"); - return !success; - }), - s_active_codes.end()); + std::erase_if(s_active_codes, [&cpu_guard](const ARCode& code) { + const bool success = RunCodeLocked(cpu_guard, code); + LogInfo("\n"); + return !success; + }); s_disable_logging = true; }