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

Unified Diff: tools/gn/command_refs.cc

Issue 1284833004: Remove remaining legacy SplitString calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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/gn/command_format.cc ('k') | tools/gn/input_conversion.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/command_refs.cc
diff --git a/tools/gn/command_refs.cc b/tools/gn/command_refs.cc
index 961e2102c8fa851be622f9a5faa3659d85a1934d..742b43b350338652429fdd0fad767718ed6fb877 100644
--- a/tools/gn/command_refs.cc
+++ b/tools/gn/command_refs.cc
@@ -408,7 +408,6 @@ int RunRefs(const std::vector<std::string>& args) {
if (args[i][0] == '@') {
// The argument is as a path to a response file.
std::string contents;
- std::vector<std::string> lines;
bool ret = base::ReadFileToString(UTF8ToFilePath(args[i].substr(1)),
&contents);
if (!ret) {
@@ -416,8 +415,8 @@ int RunRefs(const std::vector<std::string>& args) {
.PrintToStdout();
return 1;
}
- base::SplitString(contents, '\n', &lines);
- for (const auto& line : lines) {
+ for (const std::string& line : base::SplitString(
+ contents, "\n", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL)) {
if (!line.empty())
inputs.push_back(line);
}
« no previous file with comments | « tools/gn/command_format.cc ('k') | tools/gn/input_conversion.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698