Codechange: make some saveload functions work natively with std::string_view

This commit is contained in:
Rubidium
2025-04-30 21:25:06 +02:00
committed by rubidium42
parent 855377191e
commit c1a287ad17
6 changed files with 20 additions and 19 deletions

View File

@@ -231,7 +231,7 @@ static std::tuple<SavegameType, std::string> DetermineOldSavegameTypeAndName(Fil
typedef bool LoadOldMainProc(LoadgameState &ls);
bool LoadOldSaveGame(const std::string &file)
bool LoadOldSaveGame(std::string_view file)
{
LoadgameState ls{};
@@ -282,7 +282,7 @@ bool LoadOldSaveGame(const std::string &file)
return true;
}
std::string GetOldSaveGameName(const std::string &file)
std::string GetOldSaveGameName(std::string_view file)
{
auto f = FioFOpenFile(file, "rb", NO_DIRECTORY);
if (!f.has_value()) return {};