Codefix f60b3d7f79: compilation failure using GCC-12

This commit is contained in:
Rubidium 2025-02-09 21:18:48 +01:00 committed by rubidium42
parent 37c215f1fd
commit 77bf3084da
4 changed files with 4 additions and 4 deletions

View File

@ -24,7 +24,7 @@
*/
static bool CheckAPIVersion(const std::string &api_version)
{
return std::ranges::find(AIInfo::ApiVersions, api_version) != AIInfo::ApiVersions.end();
return std::ranges::find(AIInfo::ApiVersions, api_version) != std::end(AIInfo::ApiVersions);
}
#if defined(_WIN32)

View File

@ -16,7 +16,7 @@
class AIInfo : public ScriptInfo {
public:
/* All valid AI API versions, in order. */
static constexpr std::initializer_list<std::string_view> ApiVersions{ "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", "12", "13", "14", "15" };
static constexpr std::string_view ApiVersions[]{ "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", "12", "13", "14", "15" };
AIInfo();

View File

@ -22,7 +22,7 @@
*/
static bool CheckAPIVersion(const std::string &api_version)
{
return std::ranges::find(GameInfo::ApiVersions, api_version) != GameInfo::ApiVersions.end();
return std::ranges::find(GameInfo::ApiVersions, api_version) != std::end(GameInfo::ApiVersions);
}
#if defined(_WIN32)

View File

@ -16,7 +16,7 @@
class GameInfo : public ScriptInfo {
public:
/* All valid GameScript API versions, in order. */
static constexpr std::initializer_list<std::string_view> ApiVersions{ "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9", "1.10", "1.11", "12", "13", "14", "15" };
static constexpr std::string_view ApiVersions[]{ "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9", "1.10", "1.11", "12", "13", "14", "15" };
GameInfo();