NintendoPowerA: Use std::array where applicable

This commit is contained in:
Lioncash 2019-09-06 07:28:10 -04:00
parent 2e0c7dc973
commit 4b82c6510f
1 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,6 @@
#include "boo/inputdev/NintendoPowerA.hpp"
#include <array>
#include <cstring>
#include "boo/inputdev/DeviceSignature.hpp"
@ -20,9 +21,9 @@ void NintendoPowerA::deviceDisconnected() {
void NintendoPowerA::initialCycle() {}
void NintendoPowerA::transferCycle() {
uint8_t payload[8];
size_t recvSz = receiveUSBInterruptTransfer(payload, sizeof(payload));
if (recvSz != 8) {
std::array<uint8_t, 8> payload;
const size_t recvSz = receiveUSBInterruptTransfer(payload.data(), payload.size());
if (recvSz != payload.size()) {
return;
}