Codechange: replace 'const char *' script API parameters with std::string

This commit is contained in:
Rubidium
2023-05-06 10:07:54 +02:00
committed by rubidium42
parent b1b578f988
commit d9e93edc8b
13 changed files with 20 additions and 35 deletions

View File

@@ -125,7 +125,7 @@ public:
* @param name The name of the setting.
* @return the value for the setting, or -1 if the setting is not known.
*/
static int GetSetting(const char *name);
static int GetSetting(const std::string &name);
/**
* Get the OpenTTD version of this executable. The version is formatted
@@ -201,7 +201,7 @@ public:
* @return The loaded library object. If class_name is set, it is also available (under the scope of the import) under that name.
* @note This command can be called from the global space, and does not need an instance.
*/
static HSQOBJECT Import(const char *library, const char *class_name, int version);
static HSQOBJECT Import(const std::string &library, const std::string &class_name, int version);
private:
typedef std::map<std::string, std::string, CaseInsensitiveComparator> LoadedLibraryList; ///< The type for loaded libraries.