From 73e1e929a2aecdb26b9db8ea9a418a3f4e9c1365 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 16 Oct 2018 11:36:55 -0400 Subject: XCI: Add function for checking the existence of the program NCA The only reason the getter existed was to check whether or not the program NCA was null. Instead, we can just provide a function to query for the existence of it, instead of exposing it entirely. --- src/core/file_sys/card_image.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/core/file_sys/card_image.cpp') diff --git a/src/core/file_sys/card_image.cpp b/src/core/file_sys/card_image.cpp index 8f5142a07..ecdd7505b 100644 --- a/src/core/file_sys/card_image.cpp +++ b/src/core/file_sys/card_image.cpp @@ -122,14 +122,16 @@ u64 XCI::GetProgramTitleID() const { return secure_partition->GetProgramTitleID(); } -std::shared_ptr XCI::GetProgramNCA() const { - return program; +bool XCI::HasProgramNCA() const { + return program != nullptr; } VirtualFile XCI::GetProgramNCAFile() const { - if (GetProgramNCA() == nullptr) + if (!HasProgramNCA()) { return nullptr; - return GetProgramNCA()->GetBaseFile(); + } + + return program->GetBaseFile(); } const std::vector>& XCI::GetNCAs() const { -- cgit v1.2.3