X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/adef5abc91835e6c9e06b446c1bd3e3a42ec03bc..1c0fed5449b5ab880575587803451fc58fee13eb:/lib/base/smartptr.h diff --git a/lib/base/smartptr.h b/lib/base/smartptr.h index ac6b9eb0..a2c6691f 100644 --- a/lib/base/smartptr.h +++ b/lib/base/smartptr.h @@ -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; } };