clang++ build fixes for JavaScriptCore and WebCore
https://bugs.webkit.org/show_bug.cgi?id=42478
Reviewed by Sam Weinig.
JavaScriptCore:
* runtime/RegExpKey.h:
(JSC::operator==):
Move the RegExpKey equals operator into the JSC namespace so it can be found by ADL.
WebCore:
* platform/network/Credential.cpp:
(WebCore::Credential::type):
* platform/network/Credential.h:
Remove const qualifier on Credential::type since it doesn't have an effect on the type.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63578 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/runtime/RegExpKey.h b/JavaScriptCore/runtime/RegExpKey.h
index e5ab438..2bbdb07 100644
--- a/JavaScriptCore/runtime/RegExpKey.h
+++ b/JavaScriptCore/runtime/RegExpKey.h
@@ -76,13 +76,8 @@
return flagsValue;
}
};
-} // namespace JSC
-namespace WTF {
-template<typename T> struct DefaultHash;
-template<typename T> struct RegExpHash;
-
-inline bool operator==(const JSC::RegExpKey& a, const JSC::RegExpKey& b)
+inline bool operator==(const RegExpKey& a, const RegExpKey& b)
{
if (a.flagsValue != b.flagsValue)
return false;
@@ -93,6 +88,12 @@
return equal(a.pattern.get(), b.pattern.get());
}
+} // namespace JSC
+
+namespace WTF {
+template<typename T> struct DefaultHash;
+template<typename T> struct RegExpHash;
+
template<> struct RegExpHash<JSC::RegExpKey> {
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; }