Changeset 143265 in webkit
- Timestamp:
- Feb 18, 2013, 2:38:46 PM (12 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r143254 r143265 1 2013-02-18 Alexey Proskuryakov <ap@apple.com> 2 3 Make HexNumber functions return 8-bit strings 4 https://bugs.webkit.org/show_bug.cgi?id=110152 5 6 Reviewed by Michael Saboff. 7 8 * wtf/HexNumber.h: 9 (Internal): 10 (WTF::Internal::hexDigitsForMode): 11 (WTF::appendByteAsHex): 12 (WTF::placeByteAsHexCompressIfPossible): 13 (WTF::placeByteAsHex): 14 (WTF::appendUnsignedAsHex): 15 (WTF::appendUnsignedAsHexFixedSize): 16 Use LChar everywhere. 17 1 18 2013-02-18 Benjamin Poulain <bpoulain@apple.com> 2 19 -
trunk/Source/WTF/wtf/HexNumber.h
r128829 r143265 32 32 namespace Internal { 33 33 34 const char lowerHexDigits[17] = "0123456789abcdef";35 const char upperHexDigits[17] = "0123456789ABCDEF";36 inline const char* hexDigitsForMode(HexConversionMode mode)34 const LChar lowerHexDigits[17] = "0123456789abcdef"; 35 const LChar upperHexDigits[17] = "0123456789ABCDEF"; 36 inline const LChar* hexDigitsForMode(HexConversionMode mode) 37 37 { 38 38 return mode == Lowercase ? lowerHexDigits : upperHexDigits; … … 44 44 inline void appendByteAsHex(unsigned char byte, T& destination, HexConversionMode mode = Uppercase) 45 45 { 46 const char* hexDigits = Internal::hexDigitsForMode(mode);46 const LChar* hexDigits = Internal::hexDigitsForMode(mode); 47 47 destination.append(hexDigits[byte >> 4]); 48 48 destination.append(hexDigits[byte & 0xF]); … … 52 52 inline void placeByteAsHexCompressIfPossible(unsigned char byte, T& destination, unsigned& index, HexConversionMode mode = Uppercase) 53 53 { 54 const char* hexDigits = Internal::hexDigitsForMode(mode);54 const LChar* hexDigits = Internal::hexDigitsForMode(mode); 55 55 if (byte >= 0x10) 56 56 destination[index++] = hexDigits[byte >> 4]; … … 61 61 inline void placeByteAsHex(unsigned char byte, T& destination, HexConversionMode mode = Uppercase) 62 62 { 63 const char* hexDigits = Internal::hexDigitsForMode(mode);63 const LChar* hexDigits = Internal::hexDigitsForMode(mode); 64 64 *destination++ = hexDigits[byte >> 4]; 65 65 *destination++ = hexDigits[byte & 0xF]; … … 69 69 inline void appendUnsignedAsHex(unsigned number, T& destination, HexConversionMode mode = Uppercase) 70 70 { 71 const char* hexDigits = Internal::hexDigitsForMode(mode);72 Vector< UChar, 8> result;71 const LChar* hexDigits = Internal::hexDigitsForMode(mode); 72 Vector<LChar, 8> result; 73 73 do { 74 74 result.prepend(hexDigits[number % 16]); … … 85 85 ASSERT(desiredDigits); 86 86 87 const char* hexDigits = Internal::hexDigitsForMode(mode);88 Vector< UChar, 8> result;87 const LChar* hexDigits = Internal::hexDigitsForMode(mode); 88 Vector<LChar, 8> result; 89 89 do { 90 90 result.prepend(hexDigits[number % 16]);
Note:
See TracChangeset
for help on using the changeset viewer.