diff options
author | Ben Murdoch <benm@google.com> | 2009-08-11 17:01:47 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2009-08-11 18:21:02 +0100 |
commit | 0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5 (patch) | |
tree | 2943df35f62d885c89d01063cc528dd73b480fea /JavaScriptCore/wtf/OwnArrayPtr.h | |
parent | 7e7a70bfa49a1122b2597a1e6367d89eb4035eca (diff) | |
download | external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.zip external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.gz external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.bz2 |
Merge in WebKit r47029.
Diffstat (limited to 'JavaScriptCore/wtf/OwnArrayPtr.h')
-rw-r--r-- | JavaScriptCore/wtf/OwnArrayPtr.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/JavaScriptCore/wtf/OwnArrayPtr.h b/JavaScriptCore/wtf/OwnArrayPtr.h index 344f813..61375c7 100644 --- a/JavaScriptCore/wtf/OwnArrayPtr.h +++ b/JavaScriptCore/wtf/OwnArrayPtr.h @@ -27,7 +27,7 @@ namespace WTF { - template <typename T> class OwnArrayPtr : Noncopyable { + template <typename T> class OwnArrayPtr : public Noncopyable { public: explicit OwnArrayPtr(T* ptr = 0) : m_ptr(ptr) { } ~OwnArrayPtr() { safeDelete(); } @@ -46,8 +46,12 @@ namespace WTF { bool operator!() const { return !m_ptr; } // This conversion operator allows implicit conversion to bool but not to other integer types. +#if COMPILER(WINSCW) + operator bool() const { return m_ptr; } +#else typedef T* OwnArrayPtr::*UnspecifiedBoolType; operator UnspecifiedBoolType() const { return m_ptr ? &OwnArrayPtr::m_ptr : 0; } +#endif void swap(OwnArrayPtr& o) { std::swap(m_ptr, o.m_ptr); } |