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

Unified Diff: ui/base/x/selection_utils.cc

Issue 2930573005: Use ContainsValue() instead of std::find() in ui/android, ui/base and ui/views (Closed)
Patch Set: Changed EXPECT_FALSE to EXPECT_TRUE Created 3 years, 6 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 | « ui/base/resource/resource_bundle.cc ('k') | ui/base/x/x11_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/x/selection_utils.cc
diff --git a/ui/base/x/selection_utils.cc b/ui/base/x/selection_utils.cc
index 48eff6254207666b9e23dd0c625b8b6553f951ba..39222670df9f80c8601ad3fb4a5e191e2e8ead64 100644
--- a/ui/base/x/selection_utils.cc
+++ b/ui/base/x/selection_utils.cc
@@ -6,11 +6,11 @@
#include <stdint.h>
-#include <algorithm>
#include <set>
#include "base/i18n/icu_string_conversions.h"
#include "base/logging.h"
+#include "base/stl_util.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@@ -53,9 +53,7 @@ void GetAtomIntersection(const std::vector< ::Atom>& desired,
std::vector< ::Atom>* output) {
for (std::vector< ::Atom>::const_iterator it = desired.begin();
it != desired.end(); ++it) {
- std::vector< ::Atom>::const_iterator jt =
- std::find(offered.begin(), offered.end(), *it);
- if (jt != offered.end())
+ if (base::ContainsValue(offered, *it))
output->push_back(*it);
}
}
« no previous file with comments | « ui/base/resource/resource_bundle.cc ('k') | ui/base/x/x11_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698