From 441a2812ed52d3f3ac868f6c7ec6ea003dca60e7 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 17 Apr 2020 19:26:48 -0400 Subject: loader/nso: Resolve moves not occurring in DecompressSegment Given the std::vector was const, an automatic move out of the function could not occur. We can allow automatic return value optimizations to occur by making the buffer non-const. --- src/core/loader/nso.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/loader') diff --git a/src/core/loader/nso.cpp b/src/core/loader/nso.cpp index 612ff9bf6..575330a86 100644 --- a/src/core/loader/nso.cpp +++ b/src/core/loader/nso.cpp @@ -37,7 +37,7 @@ static_assert(sizeof(MODHeader) == 0x1c, "MODHeader has incorrect size."); std::vector DecompressSegment(const std::vector& compressed_data, const NSOSegmentHeader& header) { - const std::vector uncompressed_data = + std::vector uncompressed_data = Common::Compression::DecompressDataLZ4(compressed_data, header.size); ASSERT_MSG(uncompressed_data.size() == header.size, "{} != {}", header.size, -- cgit v1.2.3