mirror of https://github.com/OpenTTD/OpenTTD
Codefix f60b3d7f79: compilation failure using GCC-12
parent
37c215f1fd
commit
77bf3084da
|
@ -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)
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue