Changeset 58001 in webkit for trunk/JavaScriptCore/runtime/UString.h
- Timestamp:
- Apr 21, 2010, 12:13:50 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/UString.h
r57248 r58001 628 628 template<> struct StrHash<JSC::UString::Rep*> { 629 629 static unsigned hash(const JSC::UString::Rep* key) { return key->hash(); } 630 static bool equal(const JSC::UString::Rep* a, const JSC::UString::Rep* b) { return JSC::equal(a, b); }630 static bool equal(const JSC::UString::Rep* a, const JSC::UString::Rep* b) { return ::equal(a, b); } 631 631 static const bool safeToCompareToEmptyOrDeleted = false; 632 632 }; … … 636 636 static unsigned hash(const RefPtr<JSC::UString::Rep>& key) { return key->hash(); } 637 637 using StrHash<JSC::UString::Rep*>::equal; 638 static bool equal(const RefPtr<JSC::UString::Rep>& a, const RefPtr<JSC::UString::Rep>& b) { return JSC::equal(a.get(), b.get()); }639 static bool equal(const JSC::UString::Rep* a, const RefPtr<JSC::UString::Rep>& b) { return JSC::equal(a, b.get()); }640 static bool equal(const RefPtr<JSC::UString::Rep>& a, const JSC::UString::Rep* b) { return JSC::equal(a.get(), b); }638 static bool equal(const RefPtr<JSC::UString::Rep>& a, const RefPtr<JSC::UString::Rep>& b) { return ::equal(a.get(), b.get()); } 639 static bool equal(const JSC::UString::Rep* a, const RefPtr<JSC::UString::Rep>& b) { return ::equal(a, b.get()); } 640 static bool equal(const RefPtr<JSC::UString::Rep>& a, const JSC::UString::Rep* b) { return ::equal(a.get(), b); } 641 641 642 642 static const bool safeToCompareToEmptyOrDeleted = false; 643 643 }; 644 644 645 template<> struct DefaultHash<JSC::UString::Rep*> {646 typedef StrHash<JSC::UString::Rep*> Hash;647 };648 649 template<> struct DefaultHash<RefPtr<JSC::UString::Rep> > {650 typedef StrHash<RefPtr<JSC::UString::Rep> > Hash;651 652 };653 654 645 template <> struct VectorTraits<JSC::UString> : SimpleClassVectorTraits 655 646 {
Note:
See TracChangeset
for help on using the changeset viewer.