Changeset 38391 in webkit for trunk/JavaScriptCore/wtf/RefPtr.h


Ignore:
Timestamp:
Nov 14, 2008, 9:53:59 AM (17 years ago)
Author:
Simon Hausmann
Message:

2008-11-14 Kristian Amlie <[email protected]>

Reviewed by Darin Adler.

Compile fix for WINSCW.

This fix doesn't protect against implicit conversions from bool to
integers, but most likely that will be caught on another platform.

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

File:
1 edited

Legend:

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

    r35900 r38391  
    6363   
    6464        // This conversion operator allows implicit conversion to bool but not to other integer types.
     65#if COMPILER(WINSCW)
     66        operator bool() const { return m_ptr; }
     67#else
    6568        typedef T* RefPtr::*UnspecifiedBoolType;
    6669        operator UnspecifiedBoolType() const { return m_ptr ? &RefPtr::m_ptr : 0; }
     70#endif
    6771       
    6872        RefPtr& operator=(const RefPtr&);
Note: See TracChangeset for help on using the changeset viewer.