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

Unified Diff: base/stl_util.h

Issue 2821313002: Use std::begin() and std::end() in base::ContainsValue() (Closed)
Patch Set: Created 3 years, 8 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 | base/stl_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/stl_util.h
diff --git a/base/stl_util.h b/base/stl_util.h
index b0670b295eb87d9a28d5621f3f86883fa038a39f..5a9b7b80a4966b4f5d10d58ab9f47b551c98bb43 100644
--- a/base/stl_util.h
+++ b/base/stl_util.h
@@ -87,8 +87,8 @@ bool ContainsKey(const Collection& collection, const Key& key) {
// Returns true if the value is in the collection.
template <typename Collection, typename Value>
bool ContainsValue(const Collection& collection, const Value& value) {
- return std::find(collection.begin(), collection.end(), value) !=
- collection.end();
+ return std::find(std::begin(collection), std::end(collection), value) !=
+ std::end(collection);
}
// Returns true if the container is sorted.
« no previous file with comments | « no previous file | base/stl_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698