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

Unified Diff: device/hid/hid_connection.cc

Issue 2935673002: Use ContainsValue() instead of std::find() in device/bluetooth and device/hid (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 | « device/bluetooth/dbus/fake_bluetooth_device_client.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/hid/hid_connection.cc
diff --git a/device/hid/hid_connection.cc b/device/hid/hid_connection.cc
index 9d5ee20f20bc0ec81f2e6b81f4337e9f9a32fc97..8c503a4d99d35cd943977adbdd5cc83894494de2 100644
--- a/device/hid/hid_connection.cc
+++ b/device/hid/hid_connection.cc
@@ -6,6 +6,7 @@
#include <algorithm>
+#include "base/stl_util.h"
#include "components/device_event_log/device_event_log.h"
namespace device {
@@ -24,9 +25,7 @@ struct CollectionHasReportId {
if (report_id_ == HidConnection::kAnyReportId)
return true;
- return std::find(info.report_ids.begin(),
- info.report_ids.end(),
- report_id_) != info.report_ids.end();
+ return base::ContainsValue(info.report_ids, report_id_);
}
private:
« no previous file with comments | « device/bluetooth/dbus/fake_bluetooth_device_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698