From eb88fedc5d7943c8335fcf25b388b3fd7b0020c5 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 20 Aug 2018 18:57:08 -0400 Subject: acc: Simplify WriteBuffer call within LoadImage() We have an overload of WriteBuffer that accepts containers that satisfy the ContiguousContainer concept, which std::array does, so we only need to pass in the array itself. --- src/core/hle/service/acc/acc.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core/hle/service/acc') diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index 2ae6ff62f..274d54653 100644 --- a/src/core/hle/service/acc/acc.cpp +++ b/src/core/hle/service/acc/acc.cpp @@ -76,8 +76,8 @@ private: LOG_WARNING(Service_ACC, "(STUBBED) called"); // smallest jpeg https://github.com/mathiasbynens/small/blob/master/jpeg.jpg // TODO(mailwl): load actual profile image from disk, width 256px, max size 0x20000 - const u32 jpeg_size = 107; - static const std::array jpeg{ + constexpr u32 jpeg_size = 107; + static constexpr std::array jpeg{ 0xff, 0xd8, 0xff, 0xdb, 0x00, 0x43, 0x00, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03, 0x04, 0x06, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x06, 0x06, 0x05, 0x06, 0x09, 0x08, 0x0a, 0x0a, 0x09, 0x08, 0x09, 0x09, 0x0a, @@ -87,7 +87,7 @@ private: 0xff, 0xcc, 0x00, 0x06, 0x00, 0x10, 0x10, 0x05, 0xff, 0xda, 0x00, 0x08, 0x01, 0x01, 0x00, 0x00, 0x3f, 0x00, 0xd2, 0xcf, 0x20, 0xff, 0xd9, }; - ctx.WriteBuffer(jpeg.data(), jpeg_size); + ctx.WriteBuffer(jpeg); IPC::ResponseBuilder rb{ctx, 3}; rb.Push(RESULT_SUCCESS); rb.Push(jpeg_size); -- cgit v1.2.3