diff options
| author | 2018-04-25 11:54:48 -0400 | |
|---|---|---|
| committer | 2018-04-25 12:35:37 -0400 | |
| commit | 3f78a61f09c97a115828521f3ee99c3db83c29f8 (patch) | |
| tree | e6d0fb855294332706a7d8d5522dcdd3c1a8b185 | |
| parent | file-sys: Move logging macros over to the new fmt-capable ones (diff) | |
| download | yuzu-3f78a61f09c97a115828521f3ee99c3db83c29f8.tar.gz yuzu-3f78a61f09c97a115828521f3ee99c3db83c29f8.tar.xz yuzu-3f78a61f09c97a115828521f3ee99c3db83c29f8.zip | |
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.
Diffstat (limited to '')
| -rw-r--r-- | src/core/file_sys/savedata_factory.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
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 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <cinttypes> | ||
| 6 | #include <memory> | 5 | #include <memory> |
| 7 | #include "common/common_types.h" | 6 | #include "common/common_types.h" |
| 8 | #include "common/logging/log.h" | 7 | #include "common/logging/log.h" |
| 9 | #include "common/string_util.h" | ||
| 10 | #include "core/core.h" | 8 | #include "core/core.h" |
| 11 | #include "core/file_sys/disk_filesystem.h" | 9 | #include "core/file_sys/disk_filesystem.h" |
| 12 | #include "core/file_sys/savedata_factory.h" | 10 | #include "core/file_sys/savedata_factory.h" |
| @@ -50,8 +48,7 @@ std::string SaveData_Factory::GetFullPath() const { | |||
| 50 | u64 title_id = Core::CurrentProcess()->program_id; | 48 | u64 title_id = Core::CurrentProcess()->program_id; |
| 51 | // TODO(Subv): Somehow obtain this value. | 49 | // TODO(Subv): Somehow obtain this value. |
| 52 | u32 user = 0; | 50 | u32 user = 0; |
| 53 | return Common::StringFromFormat("%ssave/%016" PRIX64 "/%08X/", nand_directory.c_str(), title_id, | 51 | return fmt::format("{}save/{:016X}/{:08X}/", nand_directory, title_id, user); |
| 54 | user); | ||
| 55 | } | 52 | } |
| 56 | 53 | ||
| 57 | } // namespace FileSys | 54 | } // namespace FileSys |