From 43aa763d04b524f50c73b55802b11780b75a2f82 Mon Sep 17 00:00:00 2001 From: Ujp8LfXBJ6wCPR Date: Sat, 29 Feb 2020 13:20:05 +0100 Subject: Part1: Modernize codebase with Clang-Tidy range based loops (#24164) (cherry picked from commit fb75a958f02695f166481033203869940d98b537) --- src/common/Utilities/EventMap.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/common/Utilities/EventMap.cpp') diff --git a/src/common/Utilities/EventMap.cpp b/src/common/Utilities/EventMap.cpp index 3f6a92869bf..5df8de92c43 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 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 const& itr : _eventMap) + if (eventId == (itr.second & 0x0000FFFF)) + return itr.first - _time; return std::numeric_limits::max(); } -- cgit v1.2.3