dvb.cpp: another dm500hd/dm800 demux policy fix
[enigma2.git] / lib / base / smartptr.h
index 782ff48e913049fb8e00cb528843917275399641..a2c6691f09097f2116b02cc4ef6e0b1957d7073d 100644 (file)
@@ -56,12 +56,11 @@ public:
        
 #ifndef SWIG
        T* grabRef() { if (!ptr) return 0; ptr->AddRef(); return ptr; }
-       T* &ptrref() { assert(!ptr); 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; }
 };
 
 
@@ -135,7 +134,7 @@ public:
        
 #ifndef SWIG
        T* grabRef() { if (!ptr) return 0; ptr->AddRef(); ptr->AddUse(); return ptr; }
-       T* &ptrref() { assert(!ptr); return ptr; }
+       T* &ptrref() { ASSERT(!ptr); return ptr; }
 #endif
        T* operator->() const { ptrAssert(ptr); return ptr; }
        operator T*() const { return this->ptr; }