diff options
author | Michael Lutz <michi@icosahedron.de> | 2020-12-06 21:11:50 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2020-12-27 13:19:25 +0100 |
commit | b408fe77f792650ef569f9852165759f960fd52f (patch) | |
tree | 6d1f0a134da31bd1d53dee052721d78955d688e6 /src/newgrf_config.cpp | |
parent | 358056ec428d1938b8c9219a60c6fb400115f152 (diff) | |
download | openttd-b408fe77f792650ef569f9852165759f960fd52f.tar.xz |
Codechange: Use std::string in file scanners.
Diffstat (limited to 'src/newgrf_config.cpp')
-rw-r--r-- | src/newgrf_config.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/newgrf_config.cpp b/src/newgrf_config.cpp index 75c1977f2..5ba54f26c 100644 --- a/src/newgrf_config.cpp +++ b/src/newgrf_config.cpp @@ -586,7 +586,7 @@ public: { } - bool AddFile(const char *filename, size_t basepath_length, const char *tar_filename) override; + bool AddFile(const std::string &filename, size_t basepath_length, const std::string &tar_filename) override; /** Do the scan for GRFs. */ static uint DoScan() @@ -600,9 +600,9 @@ public: } }; -bool GRFFileScanner::AddFile(const char *filename, size_t basepath_length, const char *tar_filename) +bool GRFFileScanner::AddFile(const std::string &filename, size_t basepath_length, const std::string &tar_filename) { - GRFConfig *c = new GRFConfig(filename + basepath_length); + GRFConfig *c = new GRFConfig(filename.c_str() + basepath_length); bool added = true; if (FillGRFDetails(c, false)) { |