From 868b589af62d8afec68265651d807c183c4659bf Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 26 Feb 2009 13:54:21 +0000 Subject: Commit patch #2641592 "Wrong type promotion for SharedPtr" with a slight formatting change. svn-id: r38901 --- common/ptr.h | 20 ++++++++++---------- 1 file 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 + bool operator==(const Common::SharedPtr &r) const { + return _pointer == r.get(); + } + + template + bool operator!=(const Common::SharedPtr &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 -bool operator==(const Common::SharedPtr &l, const Common::SharedPtr &r) { - return l.get() == r.get(); -} - -template -bool operator!=(const Common::SharedPtr &l, const Common::SharedPtr &r) { - return l.get() != r.get(); -} - #endif -- cgit v1.2.3