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

Unified Diff: chrome/browser/sync/util/character_set_converters_posix.cc

Issue 338037: linux: fix gcc 4.3 issues (for arm) (Closed)
Patch Set: Created 11 years, 2 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
Index: chrome/browser/sync/util/character_set_converters_posix.cc
diff --git a/chrome/browser/sync/util/character_set_converters_posix.cc b/chrome/browser/sync/util/character_set_converters_posix.cc
index d038f1f6ea5f7bf06273e2d75f45bde293013d3a..ba57214ee6efe93ef729f1d773136fdc47e13668 100644
--- a/chrome/browser/sync/util/character_set_converters_posix.cc
+++ b/chrome/browser/sync/util/character_set_converters_posix.cc
@@ -38,24 +38,26 @@ void TrimPathStringToValidCharacter(PathString* string) {
PathChar c = string->at(string->length() - 1 - partial_enc_bytes);
if ((c & 0x0c0) == 0x080) // utf continuation char;
continue;
- if ((c & 0x0e0) == 0x0e0) // 2-byte encoded char.
+ if ((c & 0x0e0) == 0x0e0) { // 2-byte encoded char.
if (1 == partial_enc_bytes)
return;
else
break;
- if ((c & 0x0f0) == 0xc0) // 3-byte encoded char.
+ }
+ if ((c & 0x0f0) == 0xc0) { // 3-byte encoded char.
if (2 == partial_enc_bytes)
return;
else
break;
- if ((c & 0x0f8) == 0x0f0) // 4-byte encoded char.
+ }
+ if ((c & 0x0f8) == 0x0f0) { // 4-byte encoded char.
if (3 == partial_enc_bytes)
return;
else
break;
+ }
}
string->resize(string->length() - 1 - partial_enc_bytes);
}
} // namespace browser_sync
-

Powered by Google App Engine
This is Rietveld 408576698