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

Unified Diff: tools/gn/standard_out.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
Index: tools/gn/standard_out.cc
diff --git a/tools/gn/standard_out.cc b/tools/gn/standard_out.cc
index 1ca74a6089adc3f890fadbd85042467a9038a06d..27f2b1a8cae108372b6f4e82c6709c03fe54b2ce 100644
--- a/tools/gn/standard_out.cc
+++ b/tools/gn/standard_out.cc
@@ -204,12 +204,10 @@ void PrintShortHelp(const std::string& line) {
void PrintLongHelp(const std::string& text) {
EnsureInitialized();
- std::vector<std::string> lines;
- base::SplitStringDontTrim(text, '\n', &lines);
-
bool first_header = true;
bool in_body = false;
- for (const auto& line : lines) {
+ for (const auto& line : base::SplitString(
+ text, "\n", base::KEEP_WHITESPACE, base::SPLIT_WANT_ALL) {
// Check for a heading line.
if (!line.empty() && line[0] != ' ') {
if (is_markdown) {

Powered by Google App Engine
This is Rietveld 408576698