Commit f6133f3e authored by Johann's avatar Johann Committed by Commit Bot

gamepad: use range-based loop

Change-Id: I0f8b76df62afb0b3f00f66806d1dff146117cc89
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2108450
Commit-Queue: Johann Koenig <johannkoenig@google.com>
Reviewed-by: default avatarBrandon Jones <bajones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#752757}
parent 4d0147e6
...@@ -123,8 +123,9 @@ void GamepadSharedMemoryReader::SampleGamepads(device::Gamepads* gamepads) { ...@@ -123,8 +123,9 @@ void GamepadSharedMemoryReader::SampleGamepads(device::Gamepads* gamepads) {
// gamepads to prevent fingerprinting. The actual data is not cleared. // gamepads to prevent fingerprinting. The actual data is not cleared.
// WebKit will only copy out data into the JS buffers for connected // WebKit will only copy out data into the JS buffers for connected
// gamepads so this is sufficient. // gamepads so this is sufficient.
for (size_t i = 0; i < device::Gamepads::kItemsLengthCap; i++) for (auto& item : gamepads->items) {
gamepads->items[i].connected = false; item.connected = false;
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment