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/filesystem/fsp_srv.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/core/hle/service/filesystem/fsp_srv.cpp') diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index cab44bf9c..fbb16a7da 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp @@ -190,7 +190,7 @@ private: return; } - const auto data = ctx.ReadBuffer(); + const std::vector data = ctx.ReadBuffer(); ASSERT_MSG( static_cast(data.size()) <= length, @@ -401,8 +401,11 @@ public: } void RenameFile(Kernel::HLERequestContext& ctx) { - const std::string src_name = Common::StringFromBuffer(ctx.ReadBuffer(0)); - const std::string dst_name = Common::StringFromBuffer(ctx.ReadBuffer(1)); + std::vector buffer = ctx.ReadBuffer(0); + const std::string src_name = Common::StringFromBuffer(buffer); + + buffer = ctx.ReadBuffer(1); + const std::string dst_name = Common::StringFromBuffer(buffer); LOG_DEBUG(Service_FS, "called. file '{}' to file '{}'", src_name, dst_name); -- cgit v1.2.3