From e1a3bda4d9881cb99c36b64733b814a3bb437f13 Mon Sep 17 00:00:00 2001 From: german77 Date: Fri, 23 Dec 2022 08:32:02 -0600 Subject: Address review comments --- src/input_common/helpers/joycon_protocol/nfc.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/input_common/helpers/joycon_protocol/nfc.cpp') diff --git a/src/input_common/helpers/joycon_protocol/nfc.cpp b/src/input_common/helpers/joycon_protocol/nfc.cpp index 69b2bfe05..8755e310b 100644 --- a/src/input_common/helpers/joycon_protocol/nfc.cpp +++ b/src/input_common/helpers/joycon_protocol/nfc.cpp @@ -7,7 +7,8 @@ namespace InputCommon::Joycon { -NfcProtocol::NfcProtocol(std::shared_ptr handle) : JoyconCommonProtocol(handle) {} +NfcProtocol::NfcProtocol(std::shared_ptr handle) + : JoyconCommonProtocol(std::move(handle)) {} DriverResult NfcProtocol::EnableNfc() { LOG_INFO(Input, "Enable NFC"); @@ -160,9 +161,9 @@ DriverResult NfcProtocol::ReadTag(const TagFoundData& data) { std::vector output; std::size_t tries = 0; - std::string uuid_string = ""; + std::string uuid_string; for (auto& content : data.uuid) { - uuid_string += " " + fmt::format("{:02x}", content); + uuid_string += fmt::format(" {:02x}", content); } LOG_INFO(Input, "Tag detected, type={}, uuid={}", data.type, uuid_string); @@ -407,7 +408,7 @@ NFCReadBlockCommand NfcProtocol::GetReadBlockCommand(std::size_t pages) const { return {}; } -bool NfcProtocol::IsEnabled() { +bool NfcProtocol::IsEnabled() const { return is_enabled; } -- cgit v1.2.3