diff --git a/components/misc/weakcache.hpp b/components/misc/weakcache.hpp index 022a722dba..3bbb0812cd 100644 --- a/components/misc/weakcache.hpp +++ b/components/misc/weakcache.hpp @@ -22,8 +22,8 @@ namespace Misc public: iterator(WeakCache* cache, typename Map::iterator current, typename Map::iterator end); iterator& operator++(); - bool operator==(const iterator& other); - bool operator!=(const iterator& other); + bool operator==(const iterator& other) const; + bool operator!=(const iterator& other) const; StrongPtr operator*(); private: WeakCache* mCache; @@ -74,13 +74,13 @@ namespace Misc } template - bool WeakCache::iterator::operator==(const iterator& other) + bool WeakCache::iterator::operator==(const iterator& other) const { return mCurrent == other.mCurrent; } template - bool WeakCache::iterator::operator!=(const iterator& other) + bool WeakCache::iterator::operator!=(const iterator& other) const { return !(*this == other); }