From ad0d549d4cc13433f77c1ac8f0ab379c83d93f28 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 24 Feb 2012 16:36:50 +0100 Subject: Imported WebKit commit bb52bf3c0119e8a128cd93afe5572413a8617de9 (http://svn.webkit.org/repository/webkit/trunk@108790) --- Source/JavaScriptCore/wtf/HashTraits.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Source/JavaScriptCore/wtf/HashTraits.h') diff --git a/Source/JavaScriptCore/wtf/HashTraits.h b/Source/JavaScriptCore/wtf/HashTraits.h index 12e6b0699..e3783ed42 100644 --- a/Source/JavaScriptCore/wtf/HashTraits.h +++ b/Source/JavaScriptCore/wtf/HashTraits.h @@ -57,6 +57,7 @@ namespace WTF { template struct GenericHashTraits : GenericHashTraitsBase::value, T> { typedef T TraitType; + typedef T EmptyValueType; static T emptyValue() { return T(); } @@ -112,7 +113,9 @@ namespace WTF { }; template struct HashTraits > : SimpleClassHashTraits > { - static std::nullptr_t emptyValue() { return nullptr; } + typedef std::nullptr_t EmptyValueType; + + static EmptyValueType emptyValue() { return nullptr; } typedef PassOwnPtr

PassInType; static void store(PassOwnPtr

value, OwnPtr

& storage) { storage = value; } @@ -144,9 +147,10 @@ namespace WTF { typedef FirstTraitsArg FirstTraits; typedef SecondTraitsArg SecondTraits; typedef pair TraitType; + typedef pair EmptyValueType; static const bool emptyValueIsZero = FirstTraits::emptyValueIsZero && SecondTraits::emptyValueIsZero; - static TraitType emptyValue() { return make_pair(FirstTraits::emptyValue(), SecondTraits::emptyValue()); } + static EmptyValueType emptyValue() { return make_pair(FirstTraits::emptyValue(), SecondTraits::emptyValue()); } static const bool needsDestruction = FirstTraits::needsDestruction || SecondTraits::needsDestruction; -- cgit v1.2.1