From 5aafc83cc9ce67b2ee052c22934e63793f37c9a7 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 25 Apr 2018 11:37:33 -0400 Subject: file-sys: Move logging macros over to the new fmt-capable ones --- src/core/file_sys/savedata_factory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/file_sys/savedata_factory.cpp') diff --git a/src/core/file_sys/savedata_factory.cpp b/src/core/file_sys/savedata_factory.cpp index 14868fed2..a1491f542 100644 --- a/src/core/file_sys/savedata_factory.cpp +++ b/src/core/file_sys/savedata_factory.cpp @@ -30,7 +30,7 @@ ResultVal> SaveData_Factory::Open(const Path& } ResultCode SaveData_Factory::Format(const Path& path) { - LOG_WARNING(Service_FS, "Format archive %s", GetName().c_str()); + NGLOG_WARNING(Service_FS, "Format archive {}", GetName()); // Create the save data directory. if (!FileUtil::CreateFullPath(GetFullPath())) { // TODO(Subv): Find the correct error code. @@ -41,7 +41,7 @@ ResultCode SaveData_Factory::Format(const Path& path) { } ResultVal SaveData_Factory::GetFormatInfo(const Path& path) const { - LOG_ERROR(Service_FS, "Unimplemented GetFormatInfo archive %s", GetName().c_str()); + NGLOG_ERROR(Service_FS, "Unimplemented GetFormatInfo archive {}", GetName()); // TODO(bunnei): Find the right error code for this return ResultCode(-1); } -- cgit v1.2.3 From 3f78a61f09c97a115828521f3ee99c3db83c29f8 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 25 Apr 2018 11:54:48 -0400 Subject: file-sys: convert a StringFromFormat call into fmt::format in GetFullPath() Lessens the amount to read and gets rid of the PRIX64 macro, allowing us to use a single string for the whole path, making it easier to read. --- src/core/file_sys/savedata_factory.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/core/file_sys/savedata_factory.cpp') diff --git a/src/core/file_sys/savedata_factory.cpp b/src/core/file_sys/savedata_factory.cpp index a1491f542..c1be8fee4 100644 --- a/src/core/file_sys/savedata_factory.cpp +++ b/src/core/file_sys/savedata_factory.cpp @@ -2,11 +2,9 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -#include #include #include "common/common_types.h" #include "common/logging/log.h" -#include "common/string_util.h" #include "core/core.h" #include "core/file_sys/disk_filesystem.h" #include "core/file_sys/savedata_factory.h" @@ -50,8 +48,7 @@ std::string SaveData_Factory::GetFullPath() const { u64 title_id = Core::CurrentProcess()->program_id; // TODO(Subv): Somehow obtain this value. u32 user = 0; - return Common::StringFromFormat("%ssave/%016" PRIX64 "/%08X/", nand_directory.c_str(), title_id, - user); + return fmt::format("{}save/{:016X}/{:08X}/", nand_directory, title_id, user); } } // namespace FileSys -- cgit v1.2.3