summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/card_image.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2021-05-02 08:34:40 +0200
committerLioncash <mathew1800@gmail.com>2021-05-02 08:59:57 +0200
commit1da72c7792e4f68fd44579a713288f6772c193b4 (patch)
tree83061da36f2dd728e86d035c81fb646f23a2aab0 /src/core/file_sys/card_image.cpp
parentMerge pull request #6245 from lat9nq/boost-only-config (diff)
downloadyuzu-1da72c7792e4f68fd44579a713288f6772c193b4.tar
yuzu-1da72c7792e4f68fd44579a713288f6772c193b4.tar.gz
yuzu-1da72c7792e4f68fd44579a713288f6772c193b4.tar.bz2
yuzu-1da72c7792e4f68fd44579a713288f6772c193b4.tar.lz
yuzu-1da72c7792e4f68fd44579a713288f6772c193b4.tar.xz
yuzu-1da72c7792e4f68fd44579a713288f6772c193b4.tar.zst
yuzu-1da72c7792e4f68fd44579a713288f6772c193b4.zip
Diffstat (limited to 'src/core/file_sys/card_image.cpp')
-rw-r--r--src/core/file_sys/card_image.cpp26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/core/file_sys/card_image.cpp b/src/core/file_sys/card_image.cpp
index 8dee5590b..db2f6a955 100644
--- a/src/core/file_sys/card_image.cpp
+++ b/src/core/file_sys/card_image.cpp
@@ -176,26 +176,30 @@ u64 XCI::GetProgramTitleID() const {
u32 XCI::GetSystemUpdateVersion() {
const auto update = GetPartition(XCIPartition::Update);
- if (update == nullptr)
+ if (update == nullptr) {
return 0;
+ }
- for (const auto& file : update->GetFiles()) {
- NCA nca{file, nullptr, 0};
+ for (const auto& update_file : update->GetFiles()) {
+ NCA nca{update_file, nullptr, 0};
- if (nca.GetStatus() != Loader::ResultStatus::Success)
+ if (nca.GetStatus() != Loader::ResultStatus::Success) {
continue;
+ }
if (nca.GetType() == NCAContentType::Meta && nca.GetTitleId() == 0x0100000000000816) {
const auto dir = nca.GetSubdirectories()[0];
const auto cnmt = dir->GetFile("SystemUpdate_0100000000000816.cnmt");
- if (cnmt == nullptr)
+ if (cnmt == nullptr) {
continue;
+ }
CNMT cnmt_data{cnmt};
const auto metas = cnmt_data.GetMetaRecords();
- if (metas.empty())
+ if (metas.empty()) {
continue;
+ }
return metas[0].title_version;
}
@@ -262,8 +266,8 @@ VirtualDir XCI::ConcatenatedPseudoDirectory() {
if (part == nullptr)
continue;
- for (const auto& file : part->GetFiles())
- out->AddFile(file);
+ for (const auto& part_file : part->GetFiles())
+ out->AddFile(part_file);
}
return out;
@@ -283,12 +287,12 @@ Loader::ResultStatus XCI::AddNCAFromPartition(XCIPartition part) {
return Loader::ResultStatus::ErrorXCIMissingPartition;
}
- for (const VirtualFile& file : partition->GetFiles()) {
- if (file->GetExtension() != "nca") {
+ for (const VirtualFile& partition_file : partition->GetFiles()) {
+ if (partition_file->GetExtension() != "nca") {
continue;
}
- auto nca = std::make_shared<NCA>(file, nullptr, 0);
+ auto nca = std::make_shared<NCA>(partition_file, nullptr, 0);
if (nca->IsUpdate()) {
continue;
}