From e4fb837f4bf886e9688ea3c12e081a2d7b4e6a75 Mon Sep 17 00:00:00 2001 From: mitaclaw <140017135+mitaclaw@users.noreply.github.com> Date: Sat, 21 Sep 2024 18:09:34 -0700 Subject: Modernize `std::find_if` with ranges In BTEmu.cpp, `std::mem_fn` was not necessary for the predicate to compile. --- Source/Core/DolphinQt/Debugger/GekkoSyntaxHighlight.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Source/Core/DolphinQt/Debugger/GekkoSyntaxHighlight.cpp') diff --git a/Source/Core/DolphinQt/Debugger/GekkoSyntaxHighlight.cpp b/Source/Core/DolphinQt/Debugger/GekkoSyntaxHighlight.cpp index 0523944f63..d29bf100db 100644 --- a/Source/Core/DolphinQt/Debugger/GekkoSyntaxHighlight.cpp +++ b/Source/Core/DolphinQt/Debugger/GekkoSyntaxHighlight.cpp @@ -162,10 +162,9 @@ void GekkoSyntaxHighlight::highlightBlock(const QString& text) } else if (m_mode == 1) { - auto paren_it = std::find_if(info->parens.begin(), info->parens.end(), - [this](const std::pair& p) { - return p.first == m_cursor_loc || p.second == m_cursor_loc; - }); + auto paren_it = std::ranges::find_if(info->parens, [this](const std::pair& p) { + return p.first == m_cursor_loc || p.second == m_cursor_loc; + }); if (paren_it != info->parens.end()) { HighlightSubstr(paren_it->first, 1, HighlightFormat::Paren); -- cgit v1.2.3