Title: [294465] trunk/Source/WTF/wtf/text/WTFString.h
Revision
294465
Author
cdu...@apple.com
Date
2022-05-18 21:03:09 -0700 (Wed, 18 May 2022)

Log Message

Drop operator==() overload for comparing a String and a LChar*
https://bugs.webkit.org/show_bug.cgi?id=240611

Reviewed by Darin Adler.

Drop operator==() overload for comparing a String and a LChar*, as it is unused.

* Source/WTF/wtf/text/WTFString.h:
(WTF::operator==):
(WTF::operator!=):

Canonical link: https://commits.webkit.org/250727@main

Modified Paths

Diff

Modified: trunk/Source/WTF/wtf/text/WTFString.h (294464 => 294465)


--- trunk/Source/WTF/wtf/text/WTFString.h	2022-05-19 03:50:47 UTC (rev 294464)
+++ trunk/Source/WTF/wtf/text/WTFString.h	2022-05-19 04:03:09 UTC (rev 294465)
@@ -334,7 +334,6 @@
 static_assert(sizeof(String) == sizeof(void*), "String should effectively be a pointer to a StringImpl, and efficient to pass by value");
 
 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); }
 inline bool operator==(const String& a, const char* b) { return equal(a.impl(), reinterpret_cast<const LChar*>(b)); }
 inline bool operator==(const String& a, ASCIILiteral b) { return equal(a.impl(), b); }
 inline bool operator==(const LChar* a, const String& b) { return equal(a, b.impl()); }
@@ -344,7 +343,6 @@
 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); }
 inline bool operator!=(const String& a, const char* b) { return !equal(a.impl(), reinterpret_cast<const LChar*>(b)); }
 inline bool operator!=(const String& a, ASCIILiteral b) { return !equal(a.impl(), b); }
 inline bool operator!=(const LChar* a, const String& b) { return !equal(a, b.impl()); }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to