diff options
Diffstat (limited to 'Source/Core/DiscIO/RiivolutionPatcher.cpp')
| -rw-r--r-- | Source/Core/DiscIO/RiivolutionPatcher.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/Core/DiscIO/RiivolutionPatcher.cpp b/Source/Core/DiscIO/RiivolutionPatcher.cpp index 840acf768b..eb0ca53137 100644 --- a/Source/Core/DiscIO/RiivolutionPatcher.cpp +++ b/Source/Core/DiscIO/RiivolutionPatcher.cpp @@ -64,13 +64,13 @@ FileDataLoaderHostFS::MakeAbsoluteFromRelative(std::string_view external_relativ return std::nullopt; #endif - std::string result = StringBeginsWith(external_relative_path, "/") ? m_sd_root : m_patch_root; + std::string result = external_relative_path.starts_with('/') ? m_sd_root : m_patch_root; std::string_view work = external_relative_path; // Strip away all leading and trailing path separators. - while (StringBeginsWith(work, "/")) + while (work.starts_with('/')) work.remove_prefix(1); - while (StringEndsWith(work, "/")) + while (work.ends_with('/')) work.remove_suffix(1); size_t depth = 0; while (true) @@ -126,7 +126,7 @@ FileDataLoaderHostFS::MakeAbsoluteFromRelative(std::string_view external_relativ work = work.substr(separator_position + 1); // Remove any potential extra path separators. - while (StringBeginsWith(work, "/")) + while (work.starts_with('/')) work = work.substr(1); } return result; @@ -425,9 +425,9 @@ static void ApplyFolderPatchToFST(const Patch& patch, const Folder& folder, return std::string(b); if (b.empty()) return std::string(a); - if (StringEndsWith(a, "/")) + if (a.ends_with('/')) a.remove_suffix(1); - if (StringBeginsWith(b, "/")) + if (b.starts_with('/')) b.remove_prefix(1); return fmt::format("{}/{}", a, b); }; |
