summaryrefslogtreecommitdiff
path: root/src/script/script_info.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_info.hpp
parent358056ec428d1938b8c9219a60c6fb400115f152 (diff)
downloadopenttd-b408fe77f792650ef569f9852165759f960fd52f.tar.xz
Codechange: Use std::string in file scanners.
Diffstat (limited to 'src/script/script_info.hpp')
-rw-r--r--src/script/script_info.hpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/script/script_info.hpp b/src/script/script_info.hpp
index 5f90e9b23..c2e952b82 100644
--- a/src/script/script_info.hpp
+++ b/src/script/script_info.hpp
@@ -32,8 +32,6 @@ public:
ScriptInfo() :
engine(nullptr),
SQ_instance(nullptr),
- main_script(nullptr),
- tar_file(nullptr),
author(nullptr),
name(nullptr),
short_name(nullptr),
@@ -89,12 +87,12 @@ public:
/**
* Get the filename of the main.nut script.
*/
- const char *GetMainScript() const { return this->main_script; }
+ const char *GetMainScript() const { return this->main_script.c_str(); }
/**
* Get the filename of the tar the script is in.
*/
- const char *GetTarFile() const { return this->tar_file; }
+ std::string GetTarFile() const { return this->tar_file; }
/**
* Check if a given method exists.
@@ -152,8 +150,8 @@ protected:
ScriptConfigItemList config_list; ///< List of settings from this Script.
private:
- char *main_script; ///< The full path of the script.
- char *tar_file; ///< If, which tar file the script was in.
+ std::string main_script; ///< The full path of the script.
+ std::string tar_file; ///< If, which tar file the script was in.
const char *author; ///< Author of the script.
const char *name; ///< Full name of the script.
const char *short_name; ///< Short name (4 chars) which uniquely identifies the script.