Codechange: Stringify config file paths.

This commit is contained in:
Michael Lutz
2020-12-06 21:11:42 +01:00
parent 860c270c73
commit dd138fc460
16 changed files with 56 additions and 64 deletions

View File

@@ -192,7 +192,7 @@ void IniLoadFile::RemoveGroup(const char *name)
* @param subdir the sub directory to load the file from.
* @pre nothing has been loaded yet.
*/
void IniLoadFile::LoadFromDisk(const char *filename, Subdirectory subdir)
void IniLoadFile::LoadFromDisk(const std::string &filename, Subdirectory subdir)
{
assert(this->last_group == &this->group);
@@ -204,7 +204,7 @@ void IniLoadFile::LoadFromDisk(const char *filename, Subdirectory subdir)
uint comment_alloc = 0;
size_t end;
FILE *in = this->OpenFile(filename, subdir, &end);
FILE *in = this->OpenFile(filename.c_str(), subdir, &end);
if (in == nullptr) return;
end += ftell(in);