From f78f82e08dcd49c2bed90daab0e494010e0084f5 Mon Sep 17 00:00:00 2001 From: 12101111 Date: Tue, 30 May 2023 16:59:06 +0800 Subject: [PATCH] input_common: rename PAGE_SIZE to avoid conflict See also: https://github.com/yuzu-emu/yuzu/issues/8779 --- src/input_common/helpers/joycon_protocol/nfc.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/input_common/helpers/joycon_protocol/nfc.cpp b/src/input_common/helpers/joycon_protocol/nfc.cpp index 3b7a628e56..f7058c4a76 100644 --- a/src/input_common/helpers/joycon_protocol/nfc.cpp +++ b/src/input_common/helpers/joycon_protocol/nfc.cpp @@ -528,9 +528,9 @@ NFCWritePackage NfcProtocol::MakeAmiiboWritePackage(const TagUUID& tag_uuid, } NFCDataChunk NfcProtocol::MakeAmiiboChunk(u8 page, u8 size, std::span data) const { - constexpr u8 PAGE_SIZE = 4; + constexpr u8 NFC_PAGE_SIZE = 4; - if (static_cast(page * PAGE_SIZE) + size >= data.size()) { + if (static_cast(page * NFC_PAGE_SIZE) + size >= data.size()) { return {}; } @@ -539,7 +539,7 @@ NFCDataChunk NfcProtocol::MakeAmiiboChunk(u8 page, u8 size, std::span .data_size = size, .data = {}, }; - std::memcpy(chunk.data.data(), data.data() + (page * PAGE_SIZE), size); + std::memcpy(chunk.data.data(), data.data() + (page * NFC_PAGE_SIZE), size); return chunk; }