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 ac6b9eb0767fe8d8854e43043c63bc67e4c368f9..a2c6691f09097f2116b02cc4ef6e0b1957d7073d 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 8e3cec6f4ec951382386c91f89eeb7d0d0c541dc..22ffde6fbf7c22f397ed57a61d077d3643af4fce 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
        {