swig 1.3.39 wraps also operator bool.. we dont like this yet...
authorghost <andreas.monzner@multimedia-labs.de>
Fri, 8 May 2009 12:14:38 +0000 (14:14 +0200)
committerghost <andreas.monzner@multimedia-labs.de>
Fri, 8 May 2009 12:14:38 +0000 (14:14 +0200)
lib/base/smartptr.h
lib/service/iservice.h

index ac6b9eb..a2c6691 100644 (file)
@@ -57,11 +57,10 @@ public:
 #ifndef SWIG
        T* grabRef() { if (!ptr) return 0; ptr->AddRef(); return ptr; }
        T* &ptrref() { ASSERT(!ptr); return ptr; }
+       operator bool() const { return !!this->ptr; }
 #endif
        T* operator->() const { ptrAssert(ptr); return ptr; }
        operator T*() const { return this->ptr; }
-       
-       operator bool() const { return !!this->ptr; }
 };
 
 
index 8e3cec6..22ffde6 100644 (file)
@@ -138,6 +138,10 @@ public:
                data[3]=data3;
                data[4]=data4;
        }
+       operator bool() const
+       {
+               return valid();
+       }
 #endif
        eServiceReference(int type, int flags, const std::string &path)
                : type(type), flags(flags), path(path)
@@ -170,10 +174,6 @@ public:
                        return r < 0;
                return path < c.path;
        }
-       operator bool() const
-       {
-               return valid();
-       }
        
        int valid() const
        {