Title: [143265] trunk/Source/WTF
Revision
143265
Author
[email protected]
Date
2013-02-18 14:38:46 -0800 (Mon, 18 Feb 2013)

Log Message

        Make HexNumber functions return 8-bit strings
        https://bugs.webkit.org/show_bug.cgi?id=110152

        Reviewed by Michael Saboff.

        * wtf/HexNumber.h:
        (Internal):
        (WTF::Internal::hexDigitsForMode):
        (WTF::appendByteAsHex):
        (WTF::placeByteAsHexCompressIfPossible):
        (WTF::placeByteAsHex):
        (WTF::appendUnsignedAsHex):
        (WTF::appendUnsignedAsHexFixedSize):
        Use LChar everywhere.

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (143264 => 143265)


--- trunk/Source/WTF/ChangeLog	2013-02-18 22:31:54 UTC (rev 143264)
+++ trunk/Source/WTF/ChangeLog	2013-02-18 22:38:46 UTC (rev 143265)
@@ -1,3 +1,20 @@
+2013-02-18  Alexey Proskuryakov  <[email protected]>
+
+        Make HexNumber functions return 8-bit strings
+        https://bugs.webkit.org/show_bug.cgi?id=110152
+
+        Reviewed by Michael Saboff.
+
+        * wtf/HexNumber.h:
+        (Internal):
+        (WTF::Internal::hexDigitsForMode):
+        (WTF::appendByteAsHex):
+        (WTF::placeByteAsHexCompressIfPossible):
+        (WTF::placeByteAsHex):
+        (WTF::appendUnsignedAsHex):
+        (WTF::appendUnsignedAsHexFixedSize):
+        Use LChar everywhere.
+
 2013-02-18  Benjamin Poulain  <[email protected]>
 
         Remove Vector::dataSlot(), it has no implementation

Modified: trunk/Source/WTF/wtf/HexNumber.h (143264 => 143265)


--- trunk/Source/WTF/wtf/HexNumber.h	2013-02-18 22:31:54 UTC (rev 143264)
+++ trunk/Source/WTF/wtf/HexNumber.h	2013-02-18 22:38:46 UTC (rev 143265)
@@ -31,9 +31,9 @@
 
 namespace Internal {
 
-const char lowerHexDigits[17] = "0123456789abcdef";
-const char upperHexDigits[17] = "0123456789ABCDEF";
-inline const char* hexDigitsForMode(HexConversionMode mode)
+const LChar lowerHexDigits[17] = "0123456789abcdef";
+const LChar upperHexDigits[17] = "0123456789ABCDEF";
+inline const LChar* hexDigitsForMode(HexConversionMode mode)
 {
     return mode == Lowercase ? lowerHexDigits : upperHexDigits;
 }
@@ -43,7 +43,7 @@
 template<typename T>
 inline void appendByteAsHex(unsigned char byte, T& destination, HexConversionMode mode = Uppercase)
 {
-    const char* hexDigits = Internal::hexDigitsForMode(mode);
+    const LChar* hexDigits = Internal::hexDigitsForMode(mode);
     destination.append(hexDigits[byte >> 4]);
     destination.append(hexDigits[byte & 0xF]);
 }
@@ -51,7 +51,7 @@
 template<typename T>
 inline void placeByteAsHexCompressIfPossible(unsigned char byte, T& destination, unsigned& index, HexConversionMode mode = Uppercase)
 {
-    const char* hexDigits = Internal::hexDigitsForMode(mode);
+    const LChar* hexDigits = Internal::hexDigitsForMode(mode);
     if (byte >= 0x10)
         destination[index++] = hexDigits[byte >> 4];
     destination[index++] = hexDigits[byte & 0xF];
@@ -60,7 +60,7 @@
 template<typename T>
 inline void placeByteAsHex(unsigned char byte, T& destination, HexConversionMode mode = Uppercase)
 {
-    const char* hexDigits = Internal::hexDigitsForMode(mode);
+    const LChar* hexDigits = Internal::hexDigitsForMode(mode);
     *destination++ = hexDigits[byte >> 4];
     *destination++ = hexDigits[byte & 0xF];
 }
@@ -68,8 +68,8 @@
 template<typename T>
 inline void appendUnsignedAsHex(unsigned number, T& destination, HexConversionMode mode = Uppercase)
 {
-    const char* hexDigits = Internal::hexDigitsForMode(mode);
-    Vector<UChar, 8> result;
+    const LChar* hexDigits = Internal::hexDigitsForMode(mode);
+    Vector<LChar, 8> result;
     do {
         result.prepend(hexDigits[number % 16]);
         number >>= 4;
@@ -84,8 +84,8 @@
 {
     ASSERT(desiredDigits);
 
-    const char* hexDigits = Internal::hexDigitsForMode(mode);
-    Vector<UChar, 8> result;
+    const LChar* hexDigits = Internal::hexDigitsForMode(mode);
+    Vector<LChar, 8> result;
     do {
         result.prepend(hexDigits[number % 16]);
         number >>= 4;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to