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

Unified Diff: ui/events/event_source.cc

Issue 2926383003: Use ContainsValue() instead of std::find() in ui/aura, ui/display and ui/events (Closed)
Patch Set: 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/display/win/screen_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/event_source.cc
diff --git a/ui/events/event_source.cc b/ui/events/event_source.cc
index b7ffddb3ee23e94572eaaee630b6bdb2908d65be..fcdffe5dd1ba952ded2b43143902b197728c2441 100644
--- a/ui/events/event_source.cc
+++ b/ui/events/event_source.cc
@@ -6,6 +6,7 @@
#include <algorithm>
+#include "base/stl_util.h"
#include "ui/events/event_rewriter.h"
#include "ui/events/event_sink.h"
@@ -17,8 +18,7 @@ EventSource::~EventSource() {}
void EventSource::AddEventRewriter(EventRewriter* rewriter) {
DCHECK(rewriter);
- DCHECK(rewriter_list_.end() ==
- std::find(rewriter_list_.begin(), rewriter_list_.end(), rewriter));
+ DCHECK(!base::ContainsValue(rewriter_list_, rewriter));
rewriter_list_.push_back(rewriter);
}
« no previous file with comments | « ui/display/win/screen_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698