From bc5ae04ea080dff5609fb9833799b1618d715555 Mon Sep 17 00:00:00 2001 From: Leystryku Date: Sun, 18 Feb 2024 06:17:35 +0100 Subject: file_sys: Formatting changes and use unique_ptr in GetCacheStorageMax --- src/core/hle/service/am/service/application_functions.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/core/hle/service') diff --git a/src/core/hle/service/am/service/application_functions.cpp b/src/core/hle/service/am/service/application_functions.cpp index fe37083f3..7507263b2 100644 --- a/src/core/hle/service/am/service/application_functions.cpp +++ b/src/core/hle/service/am/service/application_functions.cpp @@ -15,9 +15,9 @@ #include "core/hle/service/cmif_serialization.h" #include "core/hle/service/filesystem/filesystem.h" #include "core/hle/service/filesystem/save_data_controller.h" +#include "core/hle/service/glue/glue_manager.h" #include "core/hle/service/ns/ns.h" #include "core/hle/service/sm/sm.h" -#include "core/hle/service/glue/glue_manager.h" namespace Service::AM { @@ -275,13 +275,13 @@ Result IApplicationFunctions::GetCacheStorageMax(Out out_cache_storage_inde std::vector nacp; R_TRY(system.GetARPManager().GetControlProperty(&nacp, m_applet->program_id)); - FileSys::RawNACP raw_nacp{}; - std::memcpy(&raw_nacp, nacp.data(), std::min(sizeof(raw_nacp), nacp.size())); + std::unique_ptr raw_nacp(new FileSys::RawNACP{}); + std::memcpy(raw_nacp.get(), nacp.data(), std::min(sizeof(*raw_nacp), nacp.size())); - *out_cache_storage_index_max = static_cast(raw_nacp.cache_storage_max_index); - *out_max_journal_size = static_cast(raw_nacp.cache_storage_data_and_journal_max_size); + *out_cache_storage_index_max = static_cast(raw_nacp->cache_storage_max_index); + *out_max_journal_size = static_cast(raw_nacp->cache_storage_data_and_journal_max_size); - R_SUCCEED(); + R_SUCCEED(); } Result IApplicationFunctions::BeginBlockingHomeButtonShortAndLongPressed(s64 unused) { -- cgit v1.2.3