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

Unified Diff: base/strings/string_util.cc

Issue 380913003: Fixes for re-enabling more MSVC level 4 warnings: base/ edition #2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix a few more issues Created 6 years, 5 months 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
« no previous file with comments | « no previous file | base/third_party/icu/icu_utf.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/strings/string_util.cc
diff --git a/base/strings/string_util.cc b/base/strings/string_util.cc
index e64b95f7635dc1ddeec4d8f0d97b4d92c0d9b2e3..ab9570f6741a5f8d981dbfd278fa37512320da50 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
« no previous file with comments | « no previous file | base/third_party/icu/icu_utf.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698