summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.co.uk>2010-12-19 12:37:09 +0200
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.co.uk>2010-12-19 12:37:09 +0200
commit6909208f063045ff105e69f4eb2812f27a9cbd9c (patch)
tree21832e6503db9cde5ada87d4b465e64ec0afa4a7 /src
parent391bf4dd6bedca99f29e69ed5220c9387013b773 (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.h7
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;