Commit patch #2641592 "Wrong type promotion for SharedPtr" with a slight formatting change.

svn-id: r38901
This commit is contained in:
Johannes Schickel 2009-02-26 13:54:21 +00:00
parent 1377a4b64c
commit 868b589af6

View file

@ -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