From 43a42f108af6bcbd91f2672731c3047c26213af1 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 22 Oct 2012 15:40:17 +0200 Subject: Imported WebKit commit 302e7806bff028bd1167a1ec7c86a1ee00ecfb49 (http://svn.webkit.org/repository/webkit/trunk@132067) New snapshot that fixes build without QtWidgets --- Source/JavaScriptCore/runtime/RegExpKey.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'Source/JavaScriptCore/runtime/RegExpKey.h') diff --git a/Source/JavaScriptCore/runtime/RegExpKey.h b/Source/JavaScriptCore/runtime/RegExpKey.h index f93fbbc1d..58fa38725 100644 --- a/Source/JavaScriptCore/runtime/RegExpKey.h +++ b/Source/JavaScriptCore/runtime/RegExpKey.h @@ -73,9 +73,17 @@ struct RegExpKey { , pattern(pattern) { } + + friend inline bool operator==(const RegExpKey& a, const RegExpKey& b); + + struct Hash { + static unsigned hash(const RegExpKey& key) { return key.pattern->hash(); } + static bool equal(const RegExpKey& a, const RegExpKey& b) { return a == b; } + static const bool safeToCompareToEmptyOrDeleted = false; + }; }; -inline bool operator==(const RegExpKey& a, const RegExpKey& b) +inline bool operator==(const RegExpKey& a, const RegExpKey& b) { if (a.flagsValue != b.flagsValue) return false; @@ -90,16 +98,9 @@ inline bool operator==(const RegExpKey& a, const RegExpKey& b) namespace WTF { template struct DefaultHash; -template struct RegExpHash; - -template<> struct RegExpHash { - static unsigned hash(const JSC::RegExpKey& key) { return key.pattern->hash(); } - static bool equal(const JSC::RegExpKey& a, const JSC::RegExpKey& b) { return a == b; } - static const bool safeToCompareToEmptyOrDeleted = false; -}; template<> struct DefaultHash { - typedef RegExpHash Hash; + typedef JSC::RegExpKey::Hash Hash; }; template<> struct HashTraits : GenericHashTraits { -- cgit v1.2.1