[C++] Uplift version to C++20

This commit is contained in:
Gliniak
2024-12-25 12:05:27 +01:00
committed by Radosław Gliński
parent a6e3d77504
commit c3586bc165
24 changed files with 175 additions and 162 deletions

View File

@@ -111,14 +111,14 @@ void XamModule::SaveLoaderData() {
std::filesystem::path host_path = loader_data_.host_path;
std::string launch_path = loader_data_.launch_path;
auto remove_prefix = [&launch_path](std::string& prefix) {
auto remove_prefix = [&launch_path](std::string_view prefix) {
if (launch_path.compare(0, prefix.length(), prefix) == 0) {
launch_path = launch_path.substr(prefix.length());
}
};
remove_prefix(std::string("game:\\"));
remove_prefix(std::string("d:\\"));
remove_prefix("game:\\");
remove_prefix("d:\\");
if (host_path.extension() == ".xex") {
host_path.remove_filename();