Index: third_party/WebKit/Source/wtf/text/WTFString.h |
diff --git a/third_party/WebKit/Source/wtf/text/WTFString.h b/third_party/WebKit/Source/wtf/text/WTFString.h |
index 0e02b8902dc3e5af8785a9aef81aedd68d50f3db..f2efeb157d943d89c89373fdc3b993e65836009f 100644 |
--- a/third_party/WebKit/Source/wtf/text/WTFString.h |
+++ b/third_party/WebKit/Source/wtf/text/WTFString.h |
@@ -442,52 +442,26 @@ class WTF_EXPORT String { |
#undef DISPATCH_CASE_OP |
inline bool operator==(const String& a, const String& b) { |
+ // We don't use equalStringView here since we want the isAtomic() fast path |
+ // inside WTF::equal. |
return equal(a.impl(), b.impl()); |
} |
-inline bool operator==(const String& a, const LChar* b) { |
- return equal(a.impl(), b); |
-} |
inline bool operator==(const String& a, const char* b) { |
- return equal(a.impl(), reinterpret_cast<const LChar*>(b)); |
-} |
-inline bool operator==(const LChar* a, const String& b) { |
- return equal(a, b.impl()); |
+ return equalStringView(a, b); |
} |
inline bool operator==(const char* a, const String& b) { |
- return equal(reinterpret_cast<const LChar*>(a), b.impl()); |
-} |
-template <size_t inlineCapacity> |
-inline bool operator==(const Vector<char, inlineCapacity>& a, const String& b) { |
- return equal(b.impl(), a.data(), a.size()); |
-} |
-template <size_t inlineCapacity> |
-inline bool operator==(const String& a, const Vector<char, inlineCapacity>& b) { |
return b == a; |
} |
inline bool operator!=(const String& a, const String& b) { |
- return !equal(a.impl(), b.impl()); |
-} |
-inline bool operator!=(const String& a, const LChar* b) { |
- return !equal(a.impl(), b); |
+ return !(a == b); |
} |
inline bool operator!=(const String& a, const char* b) { |
- return !equal(a.impl(), reinterpret_cast<const LChar*>(b)); |
-} |
-inline bool operator!=(const LChar* a, const String& b) { |
- return !equal(a, b.impl()); |
+ return !(a == b); |
} |
inline bool operator!=(const char* a, const String& b) { |
- return !equal(reinterpret_cast<const LChar*>(a), b.impl()); |
-} |
-template <size_t inlineCapacity> |
-inline bool operator!=(const Vector<char, inlineCapacity>& a, const String& b) { |
return !(a == b); |
} |
-template <size_t inlineCapacity> |
-inline bool operator!=(const String& a, const Vector<char, inlineCapacity>& b) { |
- return b != a; |
-} |
inline bool equalPossiblyIgnoringCase(const String& a, |
const String& b, |