Changeset 38391 in webkit


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

2008-11-14 Kristian Amlie <kristian.amlie@trolltech.com>

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

Location:
trunk/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r38390 r38391  
     12008-11-14  Kristian Amlie  <kristian.amlie@trolltech.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        Compile fix for WINSCW.
     6
     7        This fix doesn't protect against implicit conversions from bool to
     8        integers, but most likely that will be caught on another platform.
     9
     10        https://bugs.webkit.org/show_bug.cgi?id=22260
     11
     12        * wtf/PassRefPtr.h:
     13        (WTF::PassRefPtr::operator bool):
     14        * wtf/RefPtr.h:
     15        (WTF::RefPtr::operator bool):
     16
    1172008-11-14  Cameron Zwarich  <zwarich@apple.com>
    218
  • trunk/JavaScriptCore/wtf/PassRefPtr.h

    r35900 r38391  
    5757
    5858        // This conversion operator allows implicit conversion to bool but not to other integer types.
     59#if COMPILER(WINSCW)
     60        operator bool() const { return m_ptr; }
     61#else
    5962        typedef T* PassRefPtr::*UnspecifiedBoolType;
    6063        operator UnspecifiedBoolType() const { return m_ptr ? &PassRefPtr::m_ptr : 0; }
    61        
     64#endif
    6265        PassRefPtr& operator=(T*);
    6366        PassRefPtr& operator=(const PassRefPtr&);
  • 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.