Changeset 85749 in webkit


Ignore:
Timestamp:
May 4, 2011 7:31:46 AM (13 years ago)
Author:
Adam Roben
Message:

Another attempted build fix

  • wtf/OwnPtr.h:

(WTF::OwnPtr::operator==):
(WTF::OwnPtr::operator!=):

  • wtf/PassOwnPtr.h:

(WTF::PassOwnPtr::operator==):
(WTF::PassOwnPtr::operator!=):
Added a return statement. And made a tweak based on a suggestion from Anders Carlsson.

Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r85748 r85749  
     12011-05-04  Adam Roben  <aroben@apple.com>
     2
     3        Another attempted build fix
     4
     5        * wtf/OwnPtr.h:
     6        (WTF::OwnPtr::operator==):
     7        (WTF::OwnPtr::operator!=):
     8        * wtf/PassOwnPtr.h:
     9        (WTF::PassOwnPtr::operator==):
     10        (WTF::PassOwnPtr::operator!=):
     11        Added a return statement. And made a tweak based on a suggestion from Anders Carlsson.
     12
    1132011-05-04  Adam Roben  <aroben@apple.com>
    214
  • trunk/Source/JavaScriptCore/wtf/OwnPtr.h

    r85748 r85749  
    8585        // We should never have two OwnPtrs for the same underlying object (otherwise we'll get
    8686        // double-destruction), so these equality operators should never be needed.
    87         template<typename U> bool operator==(const OwnPtr<U>&) { COMPILE_ASSERT(sizeof(U) && false, OwnPtrs_should_never_be_equal); }
    88         template<typename U> bool operator!=(const OwnPtr<U>&) { COMPILE_ASSERT(sizeof(U) && false, OwnPtrs_should_never_be_equal); }
    89         template<typename U> bool operator==(const PassOwnPtr<U>&) { COMPILE_ASSERT(sizeof(U) && false, OwnPtrs_should_never_be_equal); }
    90         template<typename U> bool operator!=(const PassOwnPtr<U>&) { COMPILE_ASSERT(sizeof(U) && false, OwnPtrs_should_never_be_equal); }
     87        template<typename U> bool operator==(const OwnPtr<U>&) { COMPILE_ASSERT(!sizeof(U*), OwnPtrs_should_never_be_equal); return false; }
     88        template<typename U> bool operator!=(const OwnPtr<U>&) { COMPILE_ASSERT(!sizeof(U*), OwnPtrs_should_never_be_equal); return false; }
     89        template<typename U> bool operator==(const PassOwnPtr<U>&) { COMPILE_ASSERT(!sizeof(U*), OwnPtrs_should_never_be_equal); return false; }
     90        template<typename U> bool operator!=(const PassOwnPtr<U>&) { COMPILE_ASSERT(!sizeof(U*), OwnPtrs_should_never_be_equal); return false; }
    9191
    9292        PtrType m_ptr;
  • trunk/Source/JavaScriptCore/wtf/PassOwnPtr.h

    r85748 r85749  
    9393        // We should never have two OwnPtrs for the same underlying object (otherwise we'll get
    9494        // double-destruction), so these equality operators should never be needed.
    95         template<typename U> bool operator==(const PassOwnPtr<U>&) { COMPILE_ASSERT(sizeof(U) && false, OwnPtrs_should_never_be_equal); }
    96         template<typename U> bool operator!=(const PassOwnPtr<U>&) { COMPILE_ASSERT(sizeof(U) && false, OwnPtrs_should_never_be_equal); }
    97         template<typename U> bool operator==(const OwnPtr<U>&) { COMPILE_ASSERT(sizeof(U) && false, OwnPtrs_should_never_be_equal); }
    98         template<typename U> bool operator!=(const OwnPtr<U>&) { COMPILE_ASSERT(sizeof(U) && false, OwnPtrs_should_never_be_equal); }
     95        template<typename U> bool operator==(const PassOwnPtr<U>&) { COMPILE_ASSERT(!sizeof(U*), OwnPtrs_should_never_be_equal); return false; }
     96        template<typename U> bool operator!=(const PassOwnPtr<U>&) { COMPILE_ASSERT(!sizeof(U*), OwnPtrs_should_never_be_equal); return false; }
     97        template<typename U> bool operator==(const OwnPtr<U>&) { COMPILE_ASSERT(!sizeof(U*), OwnPtrs_should_never_be_equal); return false; }
     98        template<typename U> bool operator!=(const OwnPtr<U>&) { COMPILE_ASSERT(!sizeof(U*), OwnPtrs_should_never_be_equal); return false; }
    9999
    100100        mutable PtrType m_ptr;
Note: See TracChangeset for help on using the changeset viewer.