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

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

Issue 22460011: [CleanUp] Use base::STLSetDifference in place of std::set_difference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing head file. Created 7 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: chrome/browser/spellchecker/feedback.cc
diff --git a/chrome/browser/spellchecker/feedback.cc b/chrome/browser/spellchecker/feedback.cc
index 42bebbc66bee2242f7a0b6927ff2ab61b9849058..b571a53a0be789c40ca28e852efeb233ef2c9e3b 100644
--- a/chrome/browser/spellchecker/feedback.cc
+++ b/chrome/browser/spellchecker/feedback.cc
@@ -19,6 +19,8 @@
#include <algorithm>
#include <iterator>
+#include "base/stl_util.h"
+
namespace spellcheck {
Feedback::Feedback() {
@@ -44,12 +46,9 @@ void Feedback::FinalizeRemovedMisspellings(
HashCollection& renderer_hashes = renderer_it->second;
HashCollection remaining_hashes(remaining_markers.begin(),
remaining_markers.end());
- std::vector<uint32> removed_hashes;
- std::set_difference(renderer_hashes.begin(),
- renderer_hashes.end(),
- remaining_hashes.begin(),
- remaining_hashes.end(),
- std::back_inserter(removed_hashes));
+ std::vector<uint32> removed_hashes =
+ base::STLSetDifference<std::vector<uint32> >(renderer_hashes,
+ remaining_hashes);
for (std::vector<uint32>::const_iterator hash_it = removed_hashes.begin();
hash_it != removed_hashes.end();
++hash_it) {
« no previous file with comments | « chrome/browser/media_galleries/media_file_system_registry.cc ('k') | chrome/browser/spellchecker/feedback_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698