diff options
Diffstat (limited to 'base/strings/utf_string_conversion_utils.cc')
-rw-r--r-- | base/strings/utf_string_conversion_utils.cc | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/base/strings/utf_string_conversion_utils.cc b/base/strings/utf_string_conversion_utils.cc index 1a3a1c30ea..807e22db6e 100644 --- a/base/strings/utf_string_conversion_utils.cc +++ b/base/strings/utf_string_conversion_utils.cc @@ -11,15 +11,15 @@ namespace base { // ReadUnicodeCharacter -------------------------------------------------------- bool ReadUnicodeCharacter(const char* src, - int32 src_len, - int32* char_index, - uint32* code_point_out) { + int32_t src_len, + int32_t* char_index, + uint32_t* code_point_out) { // U8_NEXT expects to be able to use -1 to signal an error, so we must // use a signed type for code_point. But this function returns false // on error anyway, so code_point_out is unsigned. - int32 code_point; + int32_t code_point; CBU8_NEXT(src, *char_index, src_len, code_point); - *code_point_out = static_cast<uint32>(code_point); + *code_point_out = static_cast<uint32_t>(code_point); // The ICU macro above moves to the next char, we want to point to the last // char consumed. @@ -30,9 +30,9 @@ bool ReadUnicodeCharacter(const char* src, } bool ReadUnicodeCharacter(const char16* src, - int32 src_len, - int32* char_index, - uint32* code_point) { + int32_t src_len, + int32_t* char_index, + uint32_t* code_point) { if (CBU16_IS_SURROGATE(src[*char_index])) { if (!CBU16_IS_SURROGATE_LEAD(src[*char_index]) || *char_index + 1 >= src_len || @@ -55,9 +55,9 @@ bool ReadUnicodeCharacter(const char16* src, #if defined(WCHAR_T_IS_UTF32) bool ReadUnicodeCharacter(const wchar_t* src, - int32 /* src_len */, - int32* char_index, - uint32* code_point) { + int32_t /* src_len */, + int32_t* char_index, + uint32_t* code_point) { // Conversion is easy since the source is 32-bit. *code_point = src[*char_index]; @@ -68,7 +68,7 @@ bool ReadUnicodeCharacter(const wchar_t* src, // WriteUnicodeCharacter ------------------------------------------------------- -size_t WriteUnicodeCharacter(uint32 code_point, std::string* output) { +size_t WriteUnicodeCharacter(uint32_t code_point, std::string* output) { if (code_point <= 0x7f) { // Fast path the common case of one byte. output->push_back(static_cast<char>(code_point)); @@ -89,7 +89,7 @@ size_t WriteUnicodeCharacter(uint32 code_point, std::string* output) { return char_offset - original_char_offset; } -size_t WriteUnicodeCharacter(uint32 code_point, string16* output) { +size_t WriteUnicodeCharacter(uint32_t code_point, string16* output) { if (CBU16_LENGTH(code_point) == 1) { // Thie code point is in the Basic Multilingual Plane (BMP). output->push_back(static_cast<char16>(code_point)); |