Ignore:
Timestamp:
Jul 15, 2009, 8:18:42 AM (16 years ago)
Author:
Simon Hausmann
Message:

2009-07-07 Norbert Leser <[email protected]>

Reviewed by Simon Hausmann.

https://bugs.webkit.org/show_bug.cgi?id=27056

Alternate bool operator for codewarrior compiler (WINSCW).
Compiler (latest b482) reports error for UnspecifiedBoolType construct:
"illegal explicit conversion from 'WTF::OwnArrayPtr<JSC::Register>' to 'bool'"

Same fix as in r38391.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/OwnArrayPtr.h

    r45891 r45911  
    4747
    4848        // This conversion operator allows implicit conversion to bool but not to other integer types.
     49#if COMPILER(WINSCW)
     50        operator bool() const { return m_ptr; }
     51#else
    4952        typedef T* OwnArrayPtr::*UnspecifiedBoolType;
    5053        operator UnspecifiedBoolType() const { return m_ptr ? &OwnArrayPtr::m_ptr : 0; }
     54#endif
    5155
    5256        void swap(OwnArrayPtr& o) { std::swap(m_ptr, o.m_ptr); }
Note: See TracChangeset for help on using the changeset viewer.