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

Unified Diff: third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp

Issue 2572323002: Delete WebGamepads::length. (Closed)
Patch Set: Rebase Created 3 years, 11 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 | « ppapi/shared_impl/ppb_gamepad_shared.cc ('k') | third_party/WebKit/public/platform/Platform.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp
diff --git a/third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp b/third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp
index 8b4411abfaefc37c1c2b2bd3ea5224e79e06a36b..1dd81ed9d38c11f6266dd88a574a475fecccc33c 100644
--- a/third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp
+++ b/third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp
@@ -59,7 +59,7 @@ static void sampleGamepads(ListType* into) {
for (unsigned i = 0; i < WebGamepads::itemsLengthCap; ++i) {
WebGamepad& webGamepad = gamepads.items[i];
- if (i < gamepads.length && webGamepad.connected) {
+ if (webGamepad.connected) {
GamepadType* gamepad = into->item(i);
if (!gamepad)
gamepad = GamepadType::create();
« no previous file with comments | « ppapi/shared_impl/ppb_gamepad_shared.cc ('k') | third_party/WebKit/public/platform/Platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698