[Scummvm-cvs-logs] SF.net SVN: scummvm:[38901] scummvm/trunk/common/ptr.h
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Thu Feb 26 14:54:21 CET 2009
Revision: 38901
http://scummvm.svn.sourceforge.net/scummvm/?rev=38901&view=rev
Author: lordhoto
Date: 2009-02-26 13:54:21 +0000 (Thu, 26 Feb 2009)
Log Message:
-----------
Commit patch #2641592 "Wrong type promotion for SharedPtr" with a slight formatting change.
Modified Paths:
--------------
scummvm/trunk/common/ptr.h
Modified: scummvm/trunk/common/ptr.h
===================================================================
--- scummvm/trunk/common/ptr.h 2009-02-26 12:10:11 UTC (rev 38900)
+++ scummvm/trunk/common/ptr.h 2009-02-26 13:54:21 UTC (rev 38901)
@@ -180,6 +180,16 @@
_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 @@
} // 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
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list