summaryrefslogtreecommitdiff
path: root/src/script/script_scanner.hpp
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2020-12-06 21:11:50 +0100
committerMichael Lutz <michi@icosahedron.de>2020-12-27 13:19:25 +0100
commitb408fe77f792650ef569f9852165759f960fd52f (patch)
tree6d1f0a134da31bd1d53dee052721d78955d688e6 /src/script/script_scanner.hpp
parent358056ec428d1938b8c9219a60c6fb400115f152 (diff)
downloadopenttd-b408fe77f792650ef569f9852165759f960fd52f.tar.xz
Codechange: Use std::string in file scanners.
Diffstat (limited to 'src/script/script_scanner.hpp')
-rw-r--r--src/script/script_scanner.hpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/script/script_scanner.hpp b/src/script/script_scanner.hpp
index eb65a197e..ca9068ca1 100644
--- a/src/script/script_scanner.hpp
+++ b/src/script/script_scanner.hpp
@@ -32,12 +32,12 @@ public:
/**
* Get the current main script the ScanDir is currently tracking.
*/
- const char *GetMainScript() { return this->main_script; }
+ std::string GetMainScript() { return this->main_script; }
/**
* Get the current tar file the ScanDir is currently tracking.
*/
- const char *GetTarFile() { return this->tar_file; }
+ std::string GetTarFile() { return this->tar_file; }
/**
* Get the list of all registered scripts.
@@ -75,7 +75,7 @@ public:
*/
const char *FindMainScript(const ContentInfo *ci, bool md5sum);
- 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;
/**
* Rescan the script dir.
@@ -83,9 +83,9 @@ public:
void RescanDir();
protected:
- class Squirrel *engine; ///< The engine we're scanning with.
- char *main_script; ///< The full path of the script.
- char *tar_file; ///< If, which tar file the script was in.
+ class Squirrel *engine; ///< The engine we're scanning with.
+ std::string main_script; ///< The full path of the script.
+ std::string tar_file; ///< If, which tar file the script was in.
ScriptInfoList info_list; ///< The list of all script.
ScriptInfoList info_single_list; ///< The list of all unique script. The best script (highest version) is shown.