aboutsummaryrefslogtreecommitdiff
path: root/lib/base
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2005-09-29 22:11:43 +0000
committerFelix Domke <tmbinc@elitedvb.net>2005-09-29 22:11:43 +0000
commitb515afb729158ba2e90b82591fee0b8030281257 (patch)
tree4f8c220e1b990bd3fc7fe3b0098ced1dcb4aa90e /lib/base
parent5e70994aff1e028f4e67e66e9b838305c02ecf8c (diff)
downloadenigma2-b515afb729158ba2e90b82591fee0b8030281257.tar.gz
enigma2-b515afb729158ba2e90b82591fee0b8030281257.zip
add operator bool() for smart pointer
Diffstat (limited to 'lib/base')
-rw-r--r--lib/base/smartptr.h2
1 files changed, 2 insertions, 0 deletions
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; }
};