Browse Source

shared_ptr: Add missing conversion to bool.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@657 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
aramis_acg 15 years ago
parent
commit
b10315e2df
1 changed files with 4 additions and 0 deletions
  1. 4 0
      code/BoostWorkaround/boost/shared_ptr.hpp

+ 4 - 0
code/BoostWorkaround/boost/shared_ptr.hpp

@@ -127,6 +127,10 @@ public:
 		return ptr;
 		return ptr;
 	}
 	}
 
 
+	inline operator bool () const {
+		return ptr != NULL;
+	}
+
 	inline void reset (T* t = 0)	{
 	inline void reset (T* t = 0)	{
 		ctr = ctr->decref(ptr);
 		ctr = ctr->decref(ptr);
 		ptr = t;
 		ptr = t;