projects
/
vuplus_dvbapp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
base: fix a very theoretical performance problem
[vuplus_dvbapp]
/
lib
/
base
/
smartptr.h
diff --git
a/lib/base/smartptr.h
b/lib/base/smartptr.h
index
f9d224b
..
814d745
100644
(file)
--- 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; }
};