From 604a7bee4d5ec7424ef71f094c2f4232f606b995 Mon Sep 17 00:00:00 2001 From: "mmentovai@google.com" Date: Tue, 12 Aug 2008 19:23:14 +0000 Subject: Back out r736 due to breakage git-svn-id: svn://svn.chromium.org/chrome/trunk/src@738 0039d316-1c4b-4281-b951-d872f2087c98 --- base/string_util_icu.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'base/string_util_icu.cc') diff --git a/base/string_util_icu.cc b/base/string_util_icu.cc index fca020b..2ab933a0 100644 --- a/base/string_util_icu.cc +++ b/base/string_util_icu.cc @@ -190,7 +190,7 @@ bool WideToUTF8(const wchar_t* src, size_t src_len, std::string* output) { // character, assume the rest will be ASCII and use a buffer size the same as // the input. When it's not ASCII, assume 3-bytes per character as the // starting point. This will be resized internally later if it's too small. - if (static_cast(src[0]) < 0x80) + if (src[0] < 0x80) output->reserve(src_len); else output->reserve(src_len * 3); @@ -217,7 +217,7 @@ bool UTF8ToWide(const char* src, size_t src_len, std::wstring* output) { // the input. When it's not ASCII, assume the UTF-8 takes 2 bytes per // character (this is more conservative than 3 which we use above when // converting the other way). - if (static_cast(src[0]) < 0x80) + if (src[0] < 0x80) output->reserve(src_len); else output->reserve(src_len / 2); @@ -316,7 +316,7 @@ bool WideToCodepage(const std::wstring& wide, #elif defined(WCHAR_T_IS_UTF32) // When wchar_t is wider than UChar (16 bits), transform |wide| into a // UChar* string. Size the UChar* buffer to be large enough to hold twice - // as many UTF-16 code points as there are UTF-16 characters, in case each + // as many UTF-16 code points as there are UCS-4 characters, in case each // character translates to a UTF-16 surrogate pair, and leave room for a NUL // terminator. std::vector wide_uchar(wide.length() * 2 + 1); -- cgit v1.1