diff options
author | George Kiagiadakis <george.kiagiadakis@collabora.co.uk> | 2010-12-19 12:37:09 +0200 |
---|---|---|
committer | George Kiagiadakis <george.kiagiadakis@collabora.co.uk> | 2010-12-19 12:37:09 +0200 |
commit | 6909208f063045ff105e69f4eb2812f27a9cbd9c (patch) | |
tree | 21832e6503db9cde5ada87d4b465e64ec0afa4a7 /src | |
parent | 391bf4dd6bedca99f29e69ed5220c9387013b773 (diff) |
Remove RefPointer::operator bool() to disallow unwanted casts to integral types.
The operator T::CType*() will still work in bool casts, since any
pointer type can be implicitly cast to bool according to ISO C++.
Diffstat (limited to 'src')
-rw-r--r-- | src/QGlib/refpointer.h | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/QGlib/refpointer.h b/src/QGlib/refpointer.h index 894d89a..d35ed92 100644 --- a/src/QGlib/refpointer.h +++ b/src/QGlib/refpointer.h @@ -102,7 +102,6 @@ public: void clear(); inline bool isNull() const; - inline operator bool() const; inline bool operator!() const; inline T *operator->(); inline const T *operator->() const; @@ -304,12 +303,6 @@ inline bool RefPointer<T>::isNull() const } template <class T> -inline RefPointer<T>::operator bool() const -{ - return m_class != NULL; -} - -template <class T> inline bool RefPointer<T>::operator!() const { return m_class == NULL; |