aboutsummaryrefslogtreecommitdiff
path: root/src/common/Utilities/EventMap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/Utilities/EventMap.cpp')
-rw-r--r--src/common/Utilities/EventMap.cpp12
1 files changed, 6 insertions, 6 deletions
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<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();
}