Fix finding object cache entries.
This commit is contained in:
parent
5f38374b7a
commit
69929f596f
@ -68,9 +68,15 @@ class OSGDB_EXPORT ObjectCache : public osg::Referenced
|
||||
|
||||
virtual ~ObjectCache();
|
||||
|
||||
typedef std::pair<osg::ref_ptr<osg::Object>, double > ObjectTimeStampPair;
|
||||
typedef std::pair<std::string, osg::ref_ptr<const osgDB::Options> > FileNameOptionsPair;
|
||||
typedef std::map<FileNameOptionsPair, ObjectTimeStampPair > ObjectCacheMap;
|
||||
|
||||
class ClassComp {
|
||||
public:
|
||||
bool operator() (const ObjectCache::FileNameOptionsPair& lhs, const ObjectCache::FileNameOptionsPair& rhs);
|
||||
};
|
||||
|
||||
typedef std::pair<osg::ref_ptr<osg::Object>, double > ObjectTimeStampPair;
|
||||
typedef std::map<FileNameOptionsPair, ObjectTimeStampPair, ClassComp> ObjectCacheMap;
|
||||
|
||||
ObjectCacheMap _objectCache;
|
||||
OpenThreads::Mutex _objectCacheMutex;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user