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

Unified Diff: chrome/browser/spellchecker/spellcheck_custom_dictionary.cc

Issue 23934009: [CleanUp] Use base::STLSetDifference() in place of std::set_difference() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
diff --git a/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc b/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
index 29f89fc2d0a173754acb50347f5abc1b372cced6..6654d68dbe2c6d8640ade6405be35c2275a32238 100644
--- a/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
+++ b/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
@@ -448,12 +448,9 @@ void SpellcheckCustomDictionary::Apply(
dictionary_change.to_add().end());
}
if (!dictionary_change.to_remove().empty()) {
- WordSet updated_words;
- std::set_difference(words_.begin(),
- words_.end(),
- dictionary_change.to_remove().begin(),
- dictionary_change.to_remove().end(),
- std::inserter(updated_words, updated_words.end()));
+ WordSet updated_words =
+ base::STLSetDifference<WordSet>(words_,
+ dictionary_change.to_remove());
std::swap(words_, updated_words);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698