summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-06-11 05:02:48 +0200
committerLioncash <mathew1800@gmail.com>2019-06-11 05:27:05 +0200
commit288d027e892959f84cb0aead7570f8f789663f3a (patch)
treedab21ea260b19da8f3d923a278a19e400f049037 /src
parentfile_sys/card_image: Get rid of a magic number (diff)
downloadyuzu-288d027e892959f84cb0aead7570f8f789663f3a.tar
yuzu-288d027e892959f84cb0aead7570f8f789663f3a.tar.gz
yuzu-288d027e892959f84cb0aead7570f8f789663f3a.tar.bz2
yuzu-288d027e892959f84cb0aead7570f8f789663f3a.tar.lz
yuzu-288d027e892959f84cb0aead7570f8f789663f3a.tar.xz
yuzu-288d027e892959f84cb0aead7570f8f789663f3a.tar.zst
yuzu-288d027e892959f84cb0aead7570f8f789663f3a.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/file_sys/card_image.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/file_sys/card_image.cpp b/src/core/file_sys/card_image.cpp
index fd00e5457..4375e01fa 100644
--- a/src/core/file_sys/card_image.cpp
+++ b/src/core/file_sys/card_image.cpp
@@ -48,10 +48,12 @@ XCI::XCI(VirtualFile file_)
for (XCIPartition partition :
{XCIPartition::Update, XCIPartition::Normal, XCIPartition::Secure, XCIPartition::Logo}) {
- auto raw = main_hfs.GetFile(partition_names[static_cast<std::size_t>(partition)]);
- if (raw != nullptr)
- partitions[static_cast<std::size_t>(partition)] =
- std::make_shared<PartitionFilesystem>(raw);
+ const auto partition_idx = static_cast<std::size_t>(partition);
+ auto raw = main_hfs.GetFile(partition_names[partition_idx]);
+
+ if (raw != nullptr) {
+ partitions[partition_idx] = std::make_shared<PartitionFilesystem>(std::move(raw));
+ }
}
secure_partition = std::make_shared<NSP>(