Commit patch #2641592 "Wrong type promotion for SharedPtr" with a slight formatting change.
svn-id: r38901
This commit is contained in:
parent
1377a4b64c
commit
868b589af6
1 changed files with 10 additions and 10 deletions
20
common/ptr.h
20
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue