diff options
| author | mitaclaw <140017135+mitaclaw@users.noreply.github.com> | 2024-09-30 17:26:50 -0700 |
|---|---|---|
| committer | mitaclaw <140017135+mitaclaw@users.noreply.github.com> | 2024-12-15 19:54:16 -0800 |
| commit | 140252ffc0ae71e8b5309bff7d6550189c602702 (patch) | |
| tree | 7e6fe317fc93e0d9fc91e089ec3af86af25565f1 /Source/Core/Common/Debug/Watches.cpp | |
| parent | 860e6cf5cb7d96499aecf6f6067783bdb71c29ad (diff) | |
Modernize `std::any_of` with ranges
In WiimoteReal.cpp, JitRegCache.cpp, lambda predicates were replaced by pointers to member functions because ranges algorithms are able invoke those.
In ConvertDialog.cpp, the `std::mem_fn` helper was removed because ranges algorithms are able to handle pointers to member functions as predicates.
Diffstat (limited to 'Source/Core/Common/Debug/Watches.cpp')
| -rw-r--r-- | Source/Core/Common/Debug/Watches.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/Common/Debug/Watches.cpp b/Source/Core/Common/Debug/Watches.cpp index beeab99086..2ffad54b82 100644 --- a/Source/Core/Common/Debug/Watches.cpp +++ b/Source/Core/Common/Debug/Watches.cpp @@ -79,7 +79,7 @@ void Watches::DisableWatch(std::size_t index) bool Watches::HasEnabledWatch(u32 address) const { - return std::any_of(m_watches.begin(), m_watches.end(), [address](const auto& watch) { + return std::ranges::any_of(m_watches, [address](const auto& watch) { return watch.address == address && watch.is_enabled == Watch::State::Enabled; }); } |
