diff --git a/src/osgDB/ObjectCache.cpp b/src/osgDB/ObjectCache.cpp index 49518918f..4736a039f 100644 --- a/src/osgDB/ObjectCache.cpp +++ b/src/osgDB/ObjectCache.cpp @@ -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 {