Changeset 45911 in webkit for trunk/JavaScriptCore


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.

Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r45909 r45911  
     12009-07-07  Norbert Leser  <[email protected]>
     2
     3        Reviewed by Simon Hausmann.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=27056
     6
     7        Alternate bool operator for codewarrior compiler (WINSCW).
     8        Compiler (latest b482) reports error for UnspecifiedBoolType construct:
     9        "illegal explicit conversion from 'WTF::OwnArrayPtr<JSC::Register>' to 'bool'"
     10
     11        Same fix as in r38391.
     12
     13        * JavaScriptCore/wtf/OwnArrayPtr.h:
     14
    1152009-07-15  Norbert Leser  <[email protected]>
    216
  • 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.