diff options
-rw-r--r-- | common/ptr.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/common/ptr.h b/common/ptr.h index 21656ad32a..4d0f70ced1 100644 --- a/common/ptr.h +++ b/common/ptr.h @@ -180,6 +180,16 @@ public: _pointer = 0; } + template<class T2> + bool operator==(const Common::SharedPtr<T2> &r) const { + return _pointer == r.get(); + } + + template<class T2> + bool operator!=(const Common::SharedPtr<T2> &r) const { + return _pointer != r.get(); + } + /** * Returns the number of references to the assigned pointer. * This should just be used for debugging purposes. @@ -208,14 +218,4 @@ private: } // end of namespace Common -template<class T1, class T2> -bool operator==(const Common::SharedPtr<T1> &l, const Common::SharedPtr<T2> &r) { - return l.get() == r.get(); -} - -template<class T1, class T2> -bool operator!=(const Common::SharedPtr<T1> &l, const Common::SharedPtr<T2> &r) { - return l.get() != r.get(); -} - #endif |