From 915e43dfba5807f9cd381005ad9b427197a679b3 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 12 Dec 2023 16:40:58 -0500 Subject: [PATCH] CheatSearchWidget: Make use of CPUThreadGuard parameter in UpdateTableRows Previously, the parameter wasn't being used, because it was being shadowed by another CPUThreadGuard at its only would-be usage point. --- Source/Core/DolphinQt/CheatSearchWidget.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Source/Core/DolphinQt/CheatSearchWidget.cpp b/Source/Core/DolphinQt/CheatSearchWidget.cpp index d588c078b8..43dae75def 100644 --- a/Source/Core/DolphinQt/CheatSearchWidget.cpp +++ b/Source/Core/DolphinQt/CheatSearchWidget.cpp @@ -388,15 +388,10 @@ bool CheatSearchWidget::UpdateTableRows(const Core::CPUThreadGuard& guard, const { const bool update_status_text = source == UpdateSource::User; - std::unique_ptr tmp = - m_session->ClonePartial(begin_index, end_index); + auto tmp = m_session->ClonePartial(begin_index, end_index); tmp->SetFilterType(Cheats::FilterType::DoNotFilter); - const Cheats::SearchErrorCode error_code = [&tmp] { - Core::CPUThreadGuard guard(Core::System::GetInstance()); - return tmp->RunSearch(guard); - }(); - + const Cheats::SearchErrorCode error_code = tmp->RunSearch(guard); if (error_code != Cheats::SearchErrorCode::Success) { if (update_status_text)