Chromium Code Reviews| Index: ppapi/shared_impl/ppb_gamepad_shared.cc |
| diff --git a/ppapi/shared_impl/ppb_gamepad_shared.cc b/ppapi/shared_impl/ppb_gamepad_shared.cc |
| index a70792670a3b62012f641910453d5c84109f65d0..4ee0dd94761e3d20df3a029d4fda65fed7da78b5 100644 |
| --- a/ppapi/shared_impl/ppb_gamepad_shared.cc |
| +++ b/ppapi/shared_impl/ppb_gamepad_shared.cc |
| @@ -14,10 +14,8 @@ const size_t WebKitGamepads::kItemsLengthCap; |
| void ConvertWebKitGamepadData(const WebKitGamepads& webkit_data, |
| PP_GamepadsSampleData* output_data) { |
| - size_t length = std::min(WebKitGamepads::kItemsLengthCap, |
| - static_cast<const size_t>(webkit_data.length)); |
| - output_data->length = static_cast<unsigned>(length); |
| - for (unsigned i = 0; i < length; ++i) { |
| + output_data->length = WebKitGamepads::kItemsLengthCap; |
| + for (unsigned i = 0; i < WebKitGamepads::kItemsLengthCap; ++i) { |
| PP_GamepadSampleData& output_pad = output_data->items[i]; |
|
raymes
2016/12/15 04:14:48
Just to check - will output_data->items and webkit
aelias_OOO_until_Jul13
2016/12/15 04:19:06
Yes. The data structures have always been statica
|
| const WebKitGamepad& webkit_pad = webkit_data.items[i]; |
| output_pad.connected = webkit_pad.connected ? PP_TRUE : PP_FALSE; |