Codechange: Keep filenames of loaded Fio files in std::strings.

This commit is contained in:
Michael Lutz
2020-12-06 21:11:49 +01:00
parent 024a3f6259
commit 358056ec42
6 changed files with 22 additions and 24 deletions

View File

@@ -165,11 +165,11 @@ struct SettingsIniFile : IniLoadFile {
{
}
virtual FILE *OpenFile(const char *filename, Subdirectory subdir, size_t *size)
virtual FILE *OpenFile(const std::string &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. */
FILE *in = fopen(filename, "rb");
FILE *in = fopen(filename.c_str(), "rb");
if (in == nullptr) return nullptr;
fseek(in, 0L, SEEK_END);