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

Unified Diff: tools/json_schema_compiler/util.cc

Issue 2036013002: Remove ListValue::Append(new {Fundamental,String}Value(...)) pattern in //tools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « tools/json_schema_compiler/test/simple_api_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/util.cc
diff --git a/tools/json_schema_compiler/util.cc b/tools/json_schema_compiler/util.cc
index d1a16261d2a85ac3a8b2c9b29aaa34da357eda78..a5e1668c1ff2aef628e005e8ab1e9d19962bd430 100644
--- a/tools/json_schema_compiler/util.cc
+++ b/tools/json_schema_compiler/util.cc
@@ -138,19 +138,19 @@ bool PopulateItem(const base::Value& from,
}
void AddItemToList(const int from, base::ListValue* out) {
- out->Append(new base::FundamentalValue(from));
+ out->AppendInteger(from);
}
void AddItemToList(const bool from, base::ListValue* out) {
- out->Append(new base::FundamentalValue(from));
+ out->AppendBoolean(from);
}
void AddItemToList(const double from, base::ListValue* out) {
- out->Append(new base::FundamentalValue(from));
+ out->AppendDouble(from);
}
void AddItemToList(const std::string& from, base::ListValue* out) {
- out->Append(new base::StringValue(from));
+ out->AppendString(from);
}
void AddItemToList(const std::vector<char>& from, base::ListValue* out) {
« no previous file with comments | « tools/json_schema_compiler/test/simple_api_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698