X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/779cb6e326391280631d0b486957d5e576eb23ea..9925392e576717cc0df070ace822a6f392808bb7:/lib/base/smartptr.h diff --git a/lib/base/smartptr.h b/lib/base/smartptr.h index f9d224b0..814d7457 100644 --- a/lib/base/smartptr.h +++ b/lib/base/smartptr.h @@ -56,6 +56,8 @@ public: T* &ptrref() { assert(!ptr); return ptr; } T* operator->() const { assert(ptr); return ptr; } operator T*() const { return this->ptr; } + + operator bool() const { return !!this->ptr; } };