@@ -583,13 +583,13 @@ class GRFFileScanner : FileScanner {
public:
GRFFileScanner() : next_update(_realtime_tick), num_scanned(0)
{
}
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()
GRFFileScanner fs;
int ret = fs.Scan(".grf", NEWGRF_DIR);
@@ -597,15 +597,15 @@ public:
* duplicate NewGRFs and base sets are ignored in the return value. */
_settings_client.gui.last_newgrf_count = fs.num_scanned;
return ret;
};
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)) {
if (_all_grfs == nullptr) {
_all_grfs = c;
} else {