summaryrefslogtreecommitdiffstats
path: root/device
diff options
context:
space:
mode:
authorviettrungluu <viettrungluu@chromium.org>2014-10-16 18:20:48 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-17 01:21:04 +0000
commit2560ad88c6c237d40db5bf2e377cd552c33ef6ea (patch)
treecbb6d0a186ad1b08a917e6a07c5558389cd3f74f /device
parent7cbf7ae277ab297529d5ae4b5f3f61cc37bc77ea (diff)
downloadchromium_src-2560ad88c6c237d40db5bf2e377cd552c33ef6ea.zip
chromium_src-2560ad88c6c237d40db5bf2e377cd552c33ef6ea.tar.gz
chromium_src-2560ad88c6c237d40db5bf2e377cd552c33ef6ea.tar.bz2
Convert the few remaining ARRAYSIZE_UNSAFE -> arraysize.
There are still ARRAYSIZE_UNSAFEs in ppapi/tests/test_audio.cc, but it defines it itself, and it might be compiled by some older NaCl toolchain that doesn't support C++11. third_party/npapi/npspy/common/format.cpp also has its own ARRAYSIZE_UNSAFE, but I'm hoping to delete npspy completely.) I'll remove ARRAYSIZE_UNSAFE from base/macro.h separately, since it's quite likely we have deps that use our base (and those deps may use it). R=ben@chromium.org TBR=armansito@chromium.org BUG=423134 Review URL: https://codereview.chromium.org/663673002 Cr-Commit-Position: refs/heads/master@{#300034}
Diffstat (limited to 'device')
-rw-r--r--device/bluetooth/bluetooth_uuid_unittest.cc2
-rw-r--r--device/hid/hid_report_descriptor_unittest.cc10
2 files changed, 6 insertions, 6 deletions
diff --git a/device/bluetooth/bluetooth_uuid_unittest.cc b/device/bluetooth/bluetooth_uuid_unittest.cc
index c59ab1c..380d151 100644
--- a/device/bluetooth/bluetooth_uuid_unittest.cc
+++ b/device/bluetooth/bluetooth_uuid_unittest.cc
@@ -95,7 +95,7 @@ TEST(BluetoothUUIDTest, BluetoothUUID_CaseInsensitive) {
{ "00001aBc-0000-1000-8000-00805F9b34fB", k128Bit },
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_cases); ++i) {
+ for (size_t i = 0; i < arraysize(test_cases); ++i) {
SCOPED_TRACE("Input UUID: " + test_cases[i].input_uuid);
BluetoothUUID uuid(test_cases[i].input_uuid);
EXPECT_TRUE(uuid.IsValid());
diff --git a/device/hid/hid_report_descriptor_unittest.cc b/device/hid/hid_report_descriptor_unittest.cc
index 681459c..dc0f96a 100644
--- a/device/hid/hid_report_descriptor_unittest.cc
+++ b/device/hid/hid_report_descriptor_unittest.cc
@@ -356,7 +356,7 @@ TEST_F(HidReportDescriptorTest, ValidateDetails_Digitizer) {
digitizer.report_ids.insert(3);
HidCollectionInfo expected[] = {digitizer};
ValidateDetails(std::vector<HidCollectionInfo>(
- expected, expected + ARRAYSIZE_UNSAFE(expected)),
+ expected, expected + arraysize(expected)),
true,
6,
0,
@@ -370,7 +370,7 @@ TEST_F(HidReportDescriptorTest, ValidateDetails_Keyboard) {
keyboard.usage = HidUsageAndPage(0x06, HidUsageAndPage::kPageGenericDesktop);
HidCollectionInfo expected[] = {keyboard};
ValidateDetails(std::vector<HidCollectionInfo>(
- expected, expected + ARRAYSIZE_UNSAFE(expected)),
+ expected, expected + arraysize(expected)),
false,
8,
1,
@@ -389,7 +389,7 @@ TEST_F(HidReportDescriptorTest, ValidateDetails_Monitor) {
monitor.report_ids.insert(5);
HidCollectionInfo expected[] = {monitor};
ValidateDetails(std::vector<HidCollectionInfo>(
- expected, expected + ARRAYSIZE_UNSAFE(expected)),
+ expected, expected + arraysize(expected)),
true,
0,
0,
@@ -403,7 +403,7 @@ TEST_F(HidReportDescriptorTest, ValidateDetails_Mouse) {
mouse.usage = HidUsageAndPage(0x02, HidUsageAndPage::kPageGenericDesktop);
HidCollectionInfo expected[] = {mouse};
ValidateDetails(std::vector<HidCollectionInfo>(
- expected, expected + ARRAYSIZE_UNSAFE(expected)),
+ expected, expected + arraysize(expected)),
false,
3,
0,
@@ -426,7 +426,7 @@ TEST_F(HidReportDescriptorTest, ValidateDetails_LogitechUnifyingReceiver) {
HidCollectionInfo expected[] = {hidpp_short, hidpp_long, hidpp_dj};
ValidateDetails(std::vector<HidCollectionInfo>(
- expected, expected + ARRAYSIZE_UNSAFE(expected)),
+ expected, expected + arraysize(expected)),
true,
31,
31,