1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-17 17:32:45 +01:00

Codechange: replace char* from settingsgen

This commit is contained in:
Rubidium
2025-04-28 21:22:20 +02:00
committed by rubidium42
parent 47b5ca6115
commit be53bd320d
4 changed files with 66 additions and 88 deletions

View File

@@ -101,14 +101,14 @@ bool IniFile::SaveToDisk(const std::string &filename)
return true;
}
/* virtual */ std::optional<FileHandle> IniFile::OpenFile(const std::string &filename, Subdirectory subdir, size_t *size)
/* virtual */ std::optional<FileHandle> IniFile::OpenFile(std::string_view filename, Subdirectory subdir, size_t *size)
{
/* Open the text file in binary mode to prevent end-of-line translations
* done by ftell() and friends, as defined by K&R. */
return FioFOpenFile(filename, "rb", subdir, size);
}
/* virtual */ void IniFile::ReportFileError(const char * const pre, const char * const buffer, const char * const post)
/* virtual */ void IniFile::ReportFileError(std::string_view pre, std::string_view buffer, std::string_view post)
{
ShowInfo("{}{}{}", pre, buffer, post);
}