Title: [187723] trunk/Source/WTF
Revision
187723
Author
mmaxfi...@apple.com
Date
2015-08-01 13:14:20 -0700 (Sat, 01 Aug 2015)

Log Message

HashTraits<AtomicString> can use SimpleClassHashTraits
https://bugs.webkit.org/show_bug.cgi?id=147528

Reviewed by Andreas Kling.

No point in duplicating the code inside SimpleClassHashTraits.

* wtf/text/AtomicStringHash.h:
(WTF::HashTraits<WTF::AtomicString>::constructDeletedValue): Deleted.
(WTF::HashTraits<WTF::AtomicString>::isDeletedValue): Deleted.

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (187722 => 187723)


--- trunk/Source/WTF/ChangeLog	2015-08-01 20:08:24 UTC (rev 187722)
+++ trunk/Source/WTF/ChangeLog	2015-08-01 20:14:20 UTC (rev 187723)
@@ -1,3 +1,16 @@
+2015-08-01  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+        HashTraits<AtomicString> can use SimpleClassHashTraits
+        https://bugs.webkit.org/show_bug.cgi?id=147528
+
+        Reviewed by Andreas Kling.
+
+        No point in duplicating the code inside SimpleClassHashTraits.
+
+        * wtf/text/AtomicStringHash.h:
+        (WTF::HashTraits<WTF::AtomicString>::constructDeletedValue): Deleted.
+        (WTF::HashTraits<WTF::AtomicString>::isDeletedValue): Deleted.
+
 2015-08-01  Alex Christensen  <achristen...@webkit.org>
 
         Fix compile errors with VS2015

Modified: trunk/Source/WTF/wtf/text/AtomicStringHash.h (187722 => 187723)


--- trunk/Source/WTF/wtf/text/AtomicStringHash.h	2015-08-01 20:08:24 UTC (rev 187722)
+++ trunk/Source/WTF/wtf/text/AtomicStringHash.h	2015-08-01 20:14:20 UTC (rev 187723)
@@ -49,11 +49,7 @@
     };
 
     // AtomicStringHash is the default hash for AtomicString
-    template<> struct HashTraits<WTF::AtomicString> : GenericHashTraits<WTF::AtomicString> {
-        static const bool emptyValueIsZero = true;
-        static void constructDeletedValue(WTF::AtomicString& slot) { new (NotNull, &slot) WTF::AtomicString(HashTableDeletedValue); }
-        static bool isDeletedValue(const WTF::AtomicString& slot) { return slot.isHashTableDeletedValue(); }
-    };
+    template<> struct HashTraits<WTF::AtomicString> : SimpleClassHashTraits<WTF::AtomicString> { };
 
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to