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

Unified Diff: ui/events/ozone/evdev/event_device_test_util.cc

Issue 1274123003: Update SplitString calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no media changes Created 5 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: ui/events/ozone/evdev/event_device_test_util.cc
diff --git a/ui/events/ozone/evdev/event_device_test_util.cc b/ui/events/ozone/evdev/event_device_test_util.cc
index 218d30919cd504b53571b0b88893f811f09a9e3f..f9feb047eb75a326e2b786fa45e8d69cafe9cbcc 100644
--- a/ui/events/ozone/evdev/event_device_test_util.cc
+++ b/ui/events/ozone/evdev/event_device_test_util.cc
@@ -43,13 +43,13 @@ std::string SerializeBitfield(unsigned long* bitmap, int max) {
bool ParseBitfield(const std::string& bitfield,
size_t max_bits,
std::vector<unsigned long>* out) {
- std::vector<std::string> groups;
- base::SplitString(bitfield, ' ', &groups);
+ std::vector<std::string> groups = base::SplitString(
+ bitfield, " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
out->resize(EVDEV_BITS_TO_LONGS(max_bits));
// Convert big endian 64-bit groups to little endian EVDEV_LONG_BIT groups.
- for (unsigned int i = 0; i < groups.size(); ++i) {
+ for (size_t i = 0; i < groups.size(); ++i) {
int off = groups.size() - 1 - i;
uint64_t val;
« no previous file with comments | « ui/events/devices/x11/touch_factory_x11.cc ('k') | ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698