summaryrefslogtreecommitdiffstats
path: root/base/string_util_icu.cc
diff options
context:
space:
mode:
authormmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-12 19:23:14 +0000
committermmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-12 19:23:14 +0000
commit604a7bee4d5ec7424ef71f094c2f4232f606b995 (patch)
tree93d15c5b39bcdda79ee28a842b5e70109528ca5d /base/string_util_icu.cc
parent8399598fbbd3da606e0fef699fa50a439cde5f81 (diff)
downloadchromium_src-604a7bee4d5ec7424ef71f094c2f4232f606b995.zip
chromium_src-604a7bee4d5ec7424ef71f094c2f4232f606b995.tar.gz
chromium_src-604a7bee4d5ec7424ef71f094c2f4232f606b995.tar.bz2
Back out r736 due to breakage
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@738 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/string_util_icu.cc')
-rw-r--r--base/string_util_icu.cc6
1 files changed, 3 insertions, 3 deletions
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<uint32>(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<unsigned char>(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<UChar> wide_uchar(wide.length() * 2 + 1);