From 358056ec428d1938b8c9219a60c6fb400115f152 Mon Sep 17 00:00:00 2001 From: Michael Lutz Date: Sun, 6 Dec 2020 21:11:49 +0100 Subject: Codechange: Keep filenames of loaded Fio files in std::strings. --- src/settingsgen/settingsgen.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/settingsgen') diff --git a/src/settingsgen/settingsgen.cpp b/src/settingsgen/settingsgen.cpp index b2a3c76f6..513b4c754 100644 --- a/src/settingsgen/settingsgen.cpp +++ b/src/settingsgen/settingsgen.cpp @@ -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); -- cgit v1.2.3-54-g00ecf