Title: [294189] trunk/Source/WTF/wtf/text/WTFString.h
Revision
294189
Author
[email protected]
Date
2022-05-14 00:21:49 -0700 (Sat, 14 May 2022)

Log Message

Drop unused appendNumber(Vector<CharacterType>& vector, unsigned char) function
https://bugs.webkit.org/show_bug.cgi?id=240387

Reviewed by Darin Adler.

* Source/WTF/wtf/text/WTFString.h:
(WTF::appendNumber): Deleted.

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

Modified Paths

Diff

Modified: trunk/Source/WTF/wtf/text/WTFString.h (294188 => 294189)


--- trunk/Source/WTF/wtf/text/WTFString.h	2022-05-14 06:14:52 UTC (rev 294188)
+++ trunk/Source/WTF/wtf/text/WTFString.h	2022-05-14 07:21:49 UTC (rev 294189)
@@ -377,8 +377,6 @@
 WTF_EXPORT_PRIVATE int codePointCompare(const String&, const String&);
 bool codePointCompareLessThan(const String&, const String&);
 
-template<typename CharacterType> void appendNumber(Vector<CharacterType>&, unsigned char number);
-
 // Shared global empty and null string.
 struct StaticString {
     constexpr StaticString(StringImpl::StaticStringImpl* pointer)
@@ -545,29 +543,6 @@
     return codePointCompare(a.impl(), b.impl()) < 0;
 }
 
-template<typename CharacterType>
-inline void appendNumber(Vector<CharacterType>& vector, unsigned char number)
-{
-    int numberLength = number > 99 ? 3 : (number > 9 ? 2 : 1);
-    size_t vectorSize = vector.size();
-    vector.grow(vectorSize + numberLength);
-
-    switch (numberLength) {
-    case 3:
-        vector[vectorSize + 2] = number % 10 + '0';
-        number /= 10;
-        FALLTHROUGH;
-
-    case 2:
-        vector[vectorSize + 1] = number % 10 + '0';
-        number /= 10;
-        FALLTHROUGH;
-
-    case 1:
-        vector[vectorSize] = number % 10 + '0';
-    }
-}
-
 inline String String::fromUTF8(const Vector<LChar>& characters)
 {
     if (characters.isEmpty())
@@ -633,7 +608,6 @@
 using WTF::HashTranslatorASCIILiteral;
 using WTF::KeepTrailingZeros;
 using WTF::String;
-using WTF::appendNumber;
 using WTF::charactersToDouble;
 using WTF::charactersToFloat;
 using WTF::emptyString;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to