summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nfp/nfp_device.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service/nfp/nfp_device.cpp')
-rw-r--r--src/core/hle/service/nfp/nfp_device.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/hle/service/nfp/nfp_device.cpp b/src/core/hle/service/nfp/nfp_device.cpp
index da7daae88..ce3bcccf4 100644
--- a/src/core/hle/service/nfp/nfp_device.cpp
+++ b/src/core/hle/service/nfp/nfp_device.cpp
@@ -42,10 +42,11 @@ NfpDevice::NfpDevice(Core::HID::NpadIdType npad_id_, Core::System& system_,
}
NfpDevice::~NfpDevice() {
- if (is_controller_set) {
- npad_device->DeleteCallback(callback_key);
- is_controller_set = false;
+ if (!is_controller_set) {
+ return;
}
+ npad_device->DeleteCallback(callback_key);
+ is_controller_set = false;
};
void NfpDevice::NpadUpdate(Core::HID::ControllerTriggerType type) {
@@ -453,7 +454,7 @@ Result NfpDevice::SetApplicationArea(const std::vector<u8>& data) {
return ResultSuccess;
}
-Result NfpDevice::CreateApplicationArea(u32 access_id, const std::vector<u8>& data) {
+Result NfpDevice::CreateApplicationArea(u32 access_id, std::span<const u8> data) {
if (device_state != DeviceState::TagMounted) {
LOG_ERROR(Service_NFP, "Wrong device state {}", device_state);
if (device_state == DeviceState::TagRemoved) {
@@ -470,7 +471,7 @@ Result NfpDevice::CreateApplicationArea(u32 access_id, const std::vector<u8>& da
return RecreateApplicationArea(access_id, data);
}
-Result NfpDevice::RecreateApplicationArea(u32 access_id, const std::vector<u8>& data) {
+Result NfpDevice::RecreateApplicationArea(u32 access_id, std::span<const u8> data) {
if (device_state != DeviceState::TagMounted) {
LOG_ERROR(Service_NFP, "Wrong device state {}", device_state);
if (device_state == DeviceState::TagRemoved) {