summaryrefslogtreecommitdiffstats
path: root/base/strings
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-10 04:38:02 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-10 04:38:02 +0000
commit253a24133db77bda145e3599e2d7582e4f8c7409 (patch)
tree86baa48d9d1c5b58468f4ec0eb370a532aa350e3 /base/strings
parentd6fb8ef93033e6c1fb10d2252ec931267135580c (diff)
downloadchromium_src-253a24133db77bda145e3599e2d7582e4f8c7409.zip
chromium_src-253a24133db77bda145e3599e2d7582e4f8c7409.tar.gz
chromium_src-253a24133db77bda145e3599e2d7582e4f8c7409.tar.bz2
Fixes for re-enabling more MSVC level 4 warnings: base/ edition #2
This contains fixes for the following sorts of issues: * Signedness mismatch Defining UChar32 as a signed type may look wrong, but it's actually how the type is already defined over in third_party/icu/. BUG=81439 TEST=none Review URL: https://codereview.chromium.org/380913003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282255 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/strings')
-rw-r--r--base/strings/string_util.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/base/strings/string_util.cc b/base/strings/string_util.cc
index e64b95f..ab9570f 100644
--- a/base/strings/string_util.cc
+++ b/base/strings/string_util.cc
@@ -223,7 +223,7 @@ void TruncateUTF8ToByteSize(const std::string& input,
// truncate the string to the end of that character.
while (char_index >= 0) {
int32 prev = char_index;
- uint32 code_point = 0;
+ base_icu::UChar32 code_point = 0;
CBU8_NEXT(data, char_index, truncation_length, code_point);
if (!IsValidCharacter(code_point) ||
!IsValidCodepoint(code_point)) {
@@ -734,11 +734,11 @@ static void EatSameChars(const CHAR** pattern, const CHAR* pattern_end,
const CHAR* string_next = *string;
base_icu::UChar32 pattern_char = next(&pattern_next, pattern_end);
if (pattern_char == next(&string_next, string_end) &&
- pattern_char != (base_icu::UChar32) CBU_SENTINEL) {
+ pattern_char != CBU_SENTINEL) {
*pattern = pattern_next;
*string = string_next;
} else {
- // Uh ho, it did not match, we are done. If the last char was an
+ // Uh oh, it did not match, we are done. If the last char was an
// escapement, that means that it was an error to advance the ptr here,
// let's put it back where it was. This also mean that the MatchPattern
// function will return false because if we can't match an escape char