Merge branch 'master' into jgrpp

This commit is contained in:
Jonathan G Rennison
2020-02-21 21:18:01 +00:00
26 changed files with 368 additions and 57 deletions

View File

@@ -589,7 +589,7 @@ struct AISettingsWindow : public Window {
}
private:
bool IsEditableItem(const ScriptConfigItem config_item) const
bool IsEditableItem(const ScriptConfigItem &config_item) const
{
return _game_mode == GM_MENU || ((this->slot != OWNER_DEITY) && !Company::IsValidID(this->slot)) || (config_item.flags & SCRIPTCONFIG_INGAME) != 0;
}

View File

@@ -15,6 +15,7 @@
#include "../debug.h"
#include "../string_func.h"
#include "../rev.h"
#include <set>
#include "../safeguards.h"
@@ -24,11 +25,8 @@
*/
static bool CheckAPIVersion(const char *api_version)
{
return strcmp(api_version, "0.7") == 0 || strcmp(api_version, "1.0") == 0 || strcmp(api_version, "1.1") == 0 ||
strcmp(api_version, "1.2") == 0 || strcmp(api_version, "1.3") == 0 || strcmp(api_version, "1.4") == 0 ||
strcmp(api_version, "1.5") == 0 || strcmp(api_version, "1.6") == 0 || strcmp(api_version, "1.7") == 0 ||
strcmp(api_version, "1.8") == 0 || strcmp(api_version, "1.9") == 0 || strcmp(api_version, "1.10") == 0 ||
strcmp(api_version, "1.11") == 0;
static const std::set<std::string> versions = { "0.7", "1.0", "1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9", "1.10", "1.11" };
return versions.find(api_version) != versions.end();
}
#if defined(_WIN32)