From 7ffd62424804eceb73f01b1c4e8dc216134c8295 Mon Sep 17 00:00:00 2001 From: ameerj <52414509+ameerj@users.noreply.github.com> Date: Sun, 25 Dec 2022 13:42:32 -0500 Subject: service: Use ReadBufferSpan where it is trivial to do so --- src/core/hle/service/prepo/prepo.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/core/hle/service/prepo/prepo.cpp') diff --git a/src/core/hle/service/prepo/prepo.cpp b/src/core/hle/service/prepo/prepo.cpp index 78f897d3e..f6a141b2e 100644 --- a/src/core/hle/service/prepo/prepo.cpp +++ b/src/core/hle/service/prepo/prepo.cpp @@ -57,13 +57,13 @@ private: IPC::RequestParser rp{ctx}; const auto process_id = rp.PopRaw(); - const auto data1 = ctx.ReadBuffer(0); + const auto data1 = ctx.ReadBufferSpan(0); const auto data2 = [&ctx] { if (ctx.CanReadBuffer(1)) { - return ctx.ReadBuffer(1); + return ctx.ReadBufferSpan(1); } - return std::vector{}; + return std::span{}; }(); LOG_DEBUG(Service_PREPO, @@ -84,13 +84,13 @@ private: const auto user_id = rp.PopRaw(); const auto process_id = rp.PopRaw(); - const auto data1 = ctx.ReadBuffer(0); + const auto data1 = ctx.ReadBufferSpan(0); const auto data2 = [&ctx] { if (ctx.CanReadBuffer(1)) { - return ctx.ReadBuffer(1); + return ctx.ReadBufferSpan(1); } - return std::vector{}; + return std::span{}; }(); LOG_DEBUG(Service_PREPO, @@ -136,13 +136,13 @@ private: IPC::RequestParser rp{ctx}; const auto title_id = rp.PopRaw(); - const auto data1 = ctx.ReadBuffer(0); + const auto data1 = ctx.ReadBufferSpan(0); const auto data2 = [&ctx] { if (ctx.CanReadBuffer(1)) { - return ctx.ReadBuffer(1); + return ctx.ReadBufferSpan(1); } - return std::vector{}; + return std::span{}; }(); LOG_DEBUG(Service_PREPO, "called, title_id={:016X}, data1_size={:016X}, data2_size={:016X}", @@ -160,13 +160,13 @@ private: const auto user_id = rp.PopRaw(); const auto title_id = rp.PopRaw(); - const auto data1 = ctx.ReadBuffer(0); + const auto data1 = ctx.ReadBufferSpan(0); const auto data2 = [&ctx] { if (ctx.CanReadBuffer(1)) { - return ctx.ReadBuffer(1); + return ctx.ReadBufferSpan(1); } - return std::vector{}; + return std::span{}; }(); LOG_DEBUG(Service_PREPO, -- cgit v1.2.3