Codechange: use std::string for script API versions

This commit is contained in:
Rubidium
2023-05-04 23:06:21 +02:00
committed by rubidium42
parent 3d8d99ba11
commit 9b0123ab66
7 changed files with 17 additions and 37 deletions

View File

@@ -16,7 +16,6 @@
class AIInfo : public ScriptInfo {
public:
AIInfo();
~AIInfo();
/**
* Register the functions of this class.
@@ -46,12 +45,12 @@ public:
/**
* Get the API version this AI is written for.
*/
const char *GetAPIVersion() const { return this->api_version; }
const std::string &GetAPIVersion() const { return this->api_version; }
private:
int min_loadable_version; ///< The AI can load savegame data if the version is equal or greater than this.
bool use_as_random; ///< Should this AI be used when the user wants a "random AI"?
const char *api_version; ///< API version used by this AI.
std::string api_version; ///< API version used by this AI.
};
/** All static information from an AI library like name, version, etc. */