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

Unified Diff: base/json/json_parser.cc

Issue 596103002: Fix more disabled MSVC warnings, base/ edition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comment Created 6 years, 3 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 | « base/files/file_util.cc ('k') | base/logging.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/json/json_parser.cc
diff --git a/base/json/json_parser.cc b/base/json/json_parser.cc
index f1f43337c408663f68bde52856616a07b259638a..32e55e8fae66ec629667350cdd63bd0d9619eac2 100644
--- a/base/json/json_parser.cc
+++ b/base/json/json_parser.cc
@@ -652,7 +652,7 @@ bool JSONParser::ConsumeStringRaw(StringBuilder* out) {
NextChar();
if (hex_digit < kExtendedASCIIStart)
- string.Append(hex_digit);
+ string.Append(static_cast<char>(hex_digit));
else
DecodeUTF8(hex_digit, &string);
break;
@@ -714,7 +714,7 @@ bool JSONParser::ConsumeStringRaw(StringBuilder* out) {
return true;
} else {
if (next_char < kExtendedASCIIStart)
- string.Append(next_char);
+ string.Append(static_cast<char>(next_char));
else
DecodeUTF8(next_char, &string);
}
@@ -791,7 +791,7 @@ void JSONParser::DecodeUTF8(const int32& point, StringBuilder* dest) {
// Anything outside of the basic ASCII plane will need to be decoded from
// int32 to a multi-byte sequence.
if (point < kExtendedASCIIStart) {
- dest->Append(point);
+ dest->Append(static_cast<char>(point));
} else {
char utf8_units[4] = { 0 };
int offset = 0;
« no previous file with comments | « base/files/file_util.cc ('k') | base/logging.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698