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


Ignore:
Timestamp:
Feb 10, 2010, 3:58:46 AM (15 years ago)
Author:
[email protected]
Message:

Get rid of WINSCW hack for UnSpecifiedBoolType

Patch by Yongjun Zhang <[email protected]> on 2009-10-06
Reviewed by Simon Hausmann.

Add parenthesis around (RefPtr::*UnspecifiedBoolType) to make the WINSCW
compiler work with the default UnSpecifiedBoolType() operator.

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

  • wtf/RefPtr.h:
File:
1 edited

Legend:

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

    r48839 r54595  
    6666   
    6767        // This conversion operator allows implicit conversion to bool but not to other integer types.
    68 #if COMPILER(WINSCW)
    69         operator bool() const { return m_ptr; }
    70 #else
    71         typedef T* RefPtr::*UnspecifiedBoolType;
     68        typedef T* (RefPtr::*UnspecifiedBoolType);
    7269        operator UnspecifiedBoolType() const { return m_ptr ? &RefPtr::m_ptr : 0; }
    73 #endif
    7470       
    7571        RefPtr& operator=(const RefPtr&);
Note: See TracChangeset for help on using the changeset viewer.