diff options
author | Ujp8LfXBJ6wCPR <github@lillecarl.com> | 2020-02-29 13:20:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-29 13:20:05 +0100 |
commit | fb75a958f02695f166481033203869940d98b537 (patch) | |
tree | 1bff3b8b4a267de83708855bab471ff9de7bb36a /src/common/Utilities/EventMap.cpp | |
parent | 2b14b720da2bc38c84f373cb3ff4bcc24c1ddcf0 (diff) |
Part1: Modernize codebase with Clang-Tidy range based loops (#24164)
Diffstat (limited to 'src/common/Utilities/EventMap.cpp')
-rw-r--r-- | src/common/Utilities/EventMap.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/common/Utilities/EventMap.cpp b/src/common/Utilities/EventMap.cpp index 5aea4dc1388..46da4000a50 100644 --- a/src/common/Utilities/EventMap.cpp +++ b/src/common/Utilities/EventMap.cpp @@ -135,18 +135,18 @@ uint32 EventMap::GetNextEventTime(uint32 eventId) const if (Empty()) return 0; - for (EventStore::const_iterator itr = _eventMap.begin(); itr != _eventMap.end(); ++itr) - if (eventId == (itr->second & 0x0000FFFF)) - return itr->first; + for (std::pair<uint32 const, uint32> const& itr : _eventMap) + if (eventId == (itr.second & 0x0000FFFF)) + return itr.first; return 0; } uint32 EventMap::GetTimeUntilEvent(uint32 eventId) const { - for (EventStore::const_iterator itr = _eventMap.begin(); itr != _eventMap.end(); ++itr) - if (eventId == (itr->second & 0x0000FFFF)) - return itr->first - _time; + for (std::pair<uint32 const, uint32> const& itr : _eventMap) + if (eventId == (itr.second & 0x0000FFFF)) + return itr.first - _time; return std::numeric_limits<uint32>::max(); } |