From b01698775b468a04e4d0a9bdd86035ff00e6decb Mon Sep 17 00:00:00 2001 From: liamwhite Date: Thu, 2 Feb 2023 15:53:28 -0500 Subject: Revert "hle_ipc: Use std::span to avoid heap allocations/copies when calling ReadBuffer" --- src/core/hle/service/hid/hidbus/hidbus_base.h | 3 +-- src/core/hle/service/hid/hidbus/ringcon.cpp | 2 +- src/core/hle/service/hid/hidbus/ringcon.h | 3 +-- src/core/hle/service/hid/hidbus/starlink.cpp | 2 +- src/core/hle/service/hid/hidbus/starlink.h | 2 +- src/core/hle/service/hid/hidbus/stubbed.cpp | 2 +- src/core/hle/service/hid/hidbus/stubbed.h | 2 +- 7 files changed, 7 insertions(+), 9 deletions(-) (limited to 'src/core/hle/service/hid/hidbus') diff --git a/src/core/hle/service/hid/hidbus/hidbus_base.h b/src/core/hle/service/hid/hidbus/hidbus_base.h index 65e301137..d3960f506 100644 --- a/src/core/hle/service/hid/hidbus/hidbus_base.h +++ b/src/core/hle/service/hid/hidbus/hidbus_base.h @@ -4,7 +4,6 @@ #pragma once #include -#include #include "common/common_types.h" #include "core/hle/result.h" @@ -151,7 +150,7 @@ public: } // Assigns a command from data - virtual bool SetCommand(std::span data) { + virtual bool SetCommand(const std::vector& data) { return {}; } diff --git a/src/core/hle/service/hid/hidbus/ringcon.cpp b/src/core/hle/service/hid/hidbus/ringcon.cpp index 35847cbdd..78ed47014 100644 --- a/src/core/hle/service/hid/hidbus/ringcon.cpp +++ b/src/core/hle/service/hid/hidbus/ringcon.cpp @@ -116,7 +116,7 @@ std::vector RingController::GetReply() const { } } -bool RingController::SetCommand(std::span data) { +bool RingController::SetCommand(const std::vector& data) { if (data.size() < 4) { LOG_ERROR(Service_HID, "Command size not supported {}", data.size()); command = RingConCommands::Error; diff --git a/src/core/hle/service/hid/hidbus/ringcon.h b/src/core/hle/service/hid/hidbus/ringcon.h index c2fb386b1..845ce85a5 100644 --- a/src/core/hle/service/hid/hidbus/ringcon.h +++ b/src/core/hle/service/hid/hidbus/ringcon.h @@ -4,7 +4,6 @@ #pragma once #include -#include #include "common/common_types.h" #include "core/hle/service/hid/hidbus/hidbus_base.h" @@ -32,7 +31,7 @@ public: u8 GetDeviceId() const override; // Assigns a command from data - bool SetCommand(std::span data) override; + bool SetCommand(const std::vector& data) override; // Returns a reply from a command std::vector GetReply() const override; diff --git a/src/core/hle/service/hid/hidbus/starlink.cpp b/src/core/hle/service/hid/hidbus/starlink.cpp index d0e760314..dd439f60a 100644 --- a/src/core/hle/service/hid/hidbus/starlink.cpp +++ b/src/core/hle/service/hid/hidbus/starlink.cpp @@ -42,7 +42,7 @@ std::vector Starlink::GetReply() const { return {}; } -bool Starlink::SetCommand(std::span data) { +bool Starlink::SetCommand(const std::vector& data) { LOG_ERROR(Service_HID, "Command not implemented"); return false; } diff --git a/src/core/hle/service/hid/hidbus/starlink.h b/src/core/hle/service/hid/hidbus/starlink.h index 07c800e6e..0b1b7ba49 100644 --- a/src/core/hle/service/hid/hidbus/starlink.h +++ b/src/core/hle/service/hid/hidbus/starlink.h @@ -29,7 +29,7 @@ public: u8 GetDeviceId() const override; // Assigns a command from data - bool SetCommand(std::span data) override; + bool SetCommand(const std::vector& data) override; // Returns a reply from a command std::vector GetReply() const override; diff --git a/src/core/hle/service/hid/hidbus/stubbed.cpp b/src/core/hle/service/hid/hidbus/stubbed.cpp index 07632c872..e477443e3 100644 --- a/src/core/hle/service/hid/hidbus/stubbed.cpp +++ b/src/core/hle/service/hid/hidbus/stubbed.cpp @@ -43,7 +43,7 @@ std::vector HidbusStubbed::GetReply() const { return {}; } -bool HidbusStubbed::SetCommand(std::span data) { +bool HidbusStubbed::SetCommand(const std::vector& data) { LOG_ERROR(Service_HID, "Command not implemented"); return false; } diff --git a/src/core/hle/service/hid/hidbus/stubbed.h b/src/core/hle/service/hid/hidbus/stubbed.h index 38eaa0ecc..91165ceff 100644 --- a/src/core/hle/service/hid/hidbus/stubbed.h +++ b/src/core/hle/service/hid/hidbus/stubbed.h @@ -29,7 +29,7 @@ public: u8 GetDeviceId() const override; // Assigns a command from data - bool SetCommand(std::span data) override; + bool SetCommand(const std::vector& data) override; // Returns a reply from a command std::vector GetReply() const override; -- cgit v1.2.3