Changeset 85749 in webkit
- Timestamp:
- May 4, 2011 7:31:46 AM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r85748 r85749 1 2011-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 1 13 2011-05-04 Adam Roben <aroben@apple.com> 2 14 -
trunk/Source/JavaScriptCore/wtf/OwnPtr.h
r85748 r85749 85 85 // We should never have two OwnPtrs for the same underlying object (otherwise we'll get 86 86 // 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; } 91 91 92 92 PtrType m_ptr; -
trunk/Source/JavaScriptCore/wtf/PassOwnPtr.h
r85748 r85749 93 93 // We should never have two OwnPtrs for the same underlying object (otherwise we'll get 94 94 // 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; } 99 99 100 100 mutable PtrType m_ptr;
Note: See TracChangeset
for help on using the changeset viewer.