diff --git a/include/osgDB/ObjectCache b/include/osgDB/ObjectCache index 01b3f0581..fc068707e 100644 --- a/include/osgDB/ObjectCache +++ b/include/osgDB/ObjectCache @@ -72,7 +72,7 @@ class OSGDB_EXPORT ObjectCache : public osg::Referenced class ClassComp { public: - bool operator() (const ObjectCache::FileNameOptionsPair& lhs, const ObjectCache::FileNameOptionsPair& rhs); + bool operator() (const ObjectCache::FileNameOptionsPair& lhs, const ObjectCache::FileNameOptionsPair& rhs) const; }; typedef std::pair, double > ObjectTimeStampPair; diff --git a/src/osgDB/ObjectCache.cpp b/src/osgDB/ObjectCache.cpp index 48acc1b88..00b3aca2b 100644 --- a/src/osgDB/ObjectCache.cpp +++ b/src/osgDB/ObjectCache.cpp @@ -16,7 +16,7 @@ using namespace osgDB; -bool ObjectCache::ClassComp::operator() (const ObjectCache::FileNameOptionsPair& lhs, const ObjectCache::FileNameOptionsPair& rhs) +bool ObjectCache::ClassComp::operator() (const ObjectCache::FileNameOptionsPair& lhs, const ObjectCache::FileNameOptionsPair& rhs) const { return lhs.first < rhs.first || *lhs.second < *rhs.second; }