diff --git a/include/osgDB/ObjectCache b/include/osgDB/ObjectCache index d6179b51a..01b3f0581 100644 --- a/include/osgDB/ObjectCache +++ b/include/osgDB/ObjectCache @@ -68,9 +68,15 @@ class OSGDB_EXPORT ObjectCache : public osg::Referenced virtual ~ObjectCache(); - typedef std::pair, double > ObjectTimeStampPair; typedef std::pair > FileNameOptionsPair; - typedef std::map ObjectCacheMap; + + class ClassComp { + public: + bool operator() (const ObjectCache::FileNameOptionsPair& lhs, const ObjectCache::FileNameOptionsPair& rhs); + }; + + typedef std::pair, double > ObjectTimeStampPair; + typedef std::map ObjectCacheMap; ObjectCacheMap _objectCache; OpenThreads::Mutex _objectCacheMutex; diff --git a/src/osgDB/ObjectCache.cpp b/src/osgDB/ObjectCache.cpp index 872172395..48acc1b88 100644 --- a/src/osgDB/ObjectCache.cpp +++ b/src/osgDB/ObjectCache.cpp @@ -16,6 +16,11 @@ using namespace osgDB; +bool ObjectCache::ClassComp::operator() (const ObjectCache::FileNameOptionsPair& lhs, const ObjectCache::FileNameOptionsPair& rhs) +{ + return lhs.first < rhs.first || *lhs.second < *rhs.second; +} + //////////////////////////////////////////////////////////////////////////////////////////// // // ObjectCache