summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2020-04-17 19:26:48 -0400
committerGravatar Lioncash2020-04-17 19:26:50 -0400
commit441a2812ed52d3f3ac868f6c7ec6ea003dca60e7 (patch)
treea4e9c7e938dc0753c800653add9e2d3a5d508b88 /src
parentMerge pull request #3666 from bunnei/new-vmm (diff)
downloadyuzu-441a2812ed52d3f3ac868f6c7ec6ea003dca60e7.tar.gz
yuzu-441a2812ed52d3f3ac868f6c7ec6ea003dca60e7.tar.xz
yuzu-441a2812ed52d3f3ac868f6c7ec6ea003dca60e7.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/core/loader/nso.cpp2
1 files changed, 1 insertions, 1 deletions
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.");
37 37
38std::vector<u8> DecompressSegment(const std::vector<u8>& compressed_data, 38std::vector<u8> DecompressSegment(const std::vector<u8>& compressed_data,
39 const NSOSegmentHeader& header) { 39 const NSOSegmentHeader& header) {
40 const std::vector<u8> uncompressed_data = 40 std::vector<u8> uncompressed_data =
41 Common::Compression::DecompressDataLZ4(compressed_data, header.size); 41 Common::Compression::DecompressDataLZ4(compressed_data, header.size);
42 42
43 ASSERT_MSG(uncompressed_data.size() == header.size, "{} != {}", header.size, 43 ASSERT_MSG(uncompressed_data.size() == header.size, "{} != {}", header.size,