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

Unified Diff: chrome/tools/convert_dict/aff_reader.cc

Issue 1240183002: Update SplitString calls in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 | « chrome/test/chromedriver/server/http_handler.cc ('k') | chrome/utility/importer/bookmark_html_reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/tools/convert_dict/aff_reader.cc
diff --git a/chrome/tools/convert_dict/aff_reader.cc b/chrome/tools/convert_dict/aff_reader.cc
index 82506112f515b96627c05bf41c63543e1bd2aae6..8391c13fee6286090283d79cf39dda2b75750c06 100644
--- a/chrome/tools/convert_dict/aff_reader.cc
+++ b/chrome/tools/convert_dict/aff_reader.cc
@@ -229,8 +229,8 @@ void AffReader::AddAffix(std::string* rule) {
// To make hunspell work more happily, replace this morph rule with
// a compound flag as listed below.
// AFX D 0 d/M e
- std::vector<std::string> tokens;
- base::SplitString(part, ' ', &tokens);
+ std::vector<std::string> tokens = base::SplitString(
+ part, " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
if (tokens.size() >= 5) {
part = base::StringPrintf("%s %s/%s %s",
tokens[0].c_str(),
@@ -257,8 +257,9 @@ void AffReader::AddAffix(std::string* rule) {
// After the slash are both the flags, then whitespace, then the part
// that tells us what to strip.
- std::vector<std::string> after_slash;
- base::SplitString(part.substr(slash_index + 1), ' ', &after_slash);
+ std::vector<std::string> after_slash = base::SplitString(
+ part.substr(slash_index + 1), " ",
+ base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
if (after_slash.size() == 0) {
Panic("Found 0 terms after slash in affix rule '%s', "
"but need at least 2.",
« no previous file with comments | « chrome/test/chromedriver/server/http_handler.cc ('k') | chrome/utility/importer/bookmark_html_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698