Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3965)

Unified Diff: base/third_party/icu/icu_utf.h

Issue 100823007: Stop doing unnecessary UTF-8 to UTF-16 conversions in JSONWriter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/third_party/icu/icu_utf.h
diff --git a/base/third_party/icu/icu_utf.h b/base/third_party/icu/icu_utf.h
index 9cb124727326dd88ebf55a12ecb83e256350e2fa..a000816c36208144ce3098ca6ff99b08719a7821 100644
--- a/base/third_party/icu/icu_utf.h
+++ b/base/third_party/icu/icu_utf.h
@@ -22,6 +22,7 @@
namespace base_icu {
typedef uint32 UChar32;
+typedef uint16 UChar;
typedef int8 UBool;
// General ---------------------------------------------------------------------
@@ -304,7 +305,7 @@ UChar32 utf8_nextCharSafeBody(const uint8 *s, int32 *pi, int32 length, UChar32 c
* @return lead surrogate (U+d800..U+dbff) for supplementary
* @stable ICU 2.4
*/
-#define CBU16_LEAD(supplementary) (UChar)(((supplementary)>>10)+0xd7c0)
+#define CBU16_LEAD(supplementary) (base_icu::UChar)(((supplementary)>>10)+0xd7c0)
/**
* Get the trail surrogate (0xdc00..0xdfff) for a
@@ -313,7 +314,7 @@ UChar32 utf8_nextCharSafeBody(const uint8 *s, int32 *pi, int32 length, UChar32 c
* @return trail surrogate (U+dc00..U+dfff) for supplementary
* @stable ICU 2.4
*/
-#define CBU16_TRAIL(supplementary) (UChar)(((supplementary)&0x3ff)|0xdc00)
+#define CBU16_TRAIL(supplementary) (base_icu::UChar)(((supplementary)&0x3ff)|0xdc00)
/**
* How many 16-bit code units are used to encode this Unicode code point? (1 or 2)

Powered by Google App Engine
This is Rietveld 408576698