summaryrefslogtreecommitdiffstats
path: root/src/core/loader/nso.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-07-19 02:24:33 +0200
committerLioncash <mathew1800@gmail.com>2018-07-19 04:26:41 +0200
commit1831b5ef62da69f45f6e677898c6b7be10ded804 (patch)
tree42589b86cd8db57ba8652fce28453c74ce3fb494 /src/core/loader/nso.cpp
parentloader/nso: Resolve sign mismatch warnings (diff)
downloadyuzu-1831b5ef62da69f45f6e677898c6b7be10ded804.tar
yuzu-1831b5ef62da69f45f6e677898c6b7be10ded804.tar.gz
yuzu-1831b5ef62da69f45f6e677898c6b7be10ded804.tar.bz2
yuzu-1831b5ef62da69f45f6e677898c6b7be10ded804.tar.lz
yuzu-1831b5ef62da69f45f6e677898c6b7be10ded804.tar.xz
yuzu-1831b5ef62da69f45f6e677898c6b7be10ded804.tar.zst
yuzu-1831b5ef62da69f45f6e677898c6b7be10ded804.zip
Diffstat (limited to 'src/core/loader/nso.cpp')
-rw-r--r--src/core/loader/nso.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/loader/nso.cpp b/src/core/loader/nso.cpp
index 4ae9d55dd..f7752e0e3 100644
--- a/src/core/loader/nso.cpp
+++ b/src/core/loader/nso.cpp
@@ -66,8 +66,7 @@ FileType AppLoader_NSO::IdentifyType(const FileSys::VirtualFile& file) {
static std::vector<u8> DecompressSegment(const std::vector<u8>& compressed_data,
const NsoSegmentHeader& header) {
- std::vector<u8> uncompressed_data;
- uncompressed_data.resize(header.size);
+ std::vector<u8> uncompressed_data(header.size);
const int bytes_uncompressed = LZ4_decompress_safe(
reinterpret_cast<const char*>(compressed_data.data()),
reinterpret_cast<char*>(uncompressed_data.data()), compressed_data.size(), header.size);
@@ -80,8 +79,7 @@ static std::vector<u8> DecompressSegment(const std::vector<u8>& compressed_data,
static std::vector<u8> ReadSegment(FileUtil::IOFile& file, const NsoSegmentHeader& header,
size_t compressed_size) {
- std::vector<u8> compressed_data;
- compressed_data.resize(compressed_size);
+ std::vector<u8> compressed_data(compressed_size);
file.Seek(header.offset, SEEK_SET);
if (compressed_size != file.ReadBytes(compressed_data.data(), compressed_size)) {