diff options
| author | mitaclaw <140017135+mitaclaw@users.noreply.github.com> | 2024-09-21 18:09:34 -0700 |
|---|---|---|
| committer | mitaclaw <140017135+mitaclaw@users.noreply.github.com> | 2024-10-10 15:28:11 -0700 |
| commit | e4fb837f4bf886e9688ea3c12e081a2d7b4e6a75 (patch) | |
| tree | 1b16603454de34fd05e2ac49a9ba4d8cdfcb3260 /Source/Core/DolphinQt/Debugger/GekkoSyntaxHighlight.cpp | |
| parent | 6ca7e2856bd704a687e8408bf7ed92b23672c7fa (diff) | |
Modernize `std::find_if` with ranges
In BTEmu.cpp, `std::mem_fn` was not necessary for the predicate to compile.
Diffstat (limited to 'Source/Core/DolphinQt/Debugger/GekkoSyntaxHighlight.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/Debugger/GekkoSyntaxHighlight.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
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<int, int>& 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<int, int>& 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); |
