Added C++ specific path for calling std::map<>::erase() to avoid issues with std::map<>::erase implementation that invalidates iterators

This commit is contained in:
Robert Osfield 2018-05-05 12:31:00 +01:00
parent 863dee52e2
commit d572d78214

View File

@ -144,7 +144,11 @@ void ObjectCache::removeExpiredObjectsInCache(double expiryTime)
{
if (oitr->second.second<=expiryTime)
{
#if __cplusplus > 199711L
oitr = _objectCache.erase(oitr);
#else
_objectCache.erase(oitr++);
#endif
}
else
{