diff --git a/src/script/api/script_sign.cpp b/src/script/api/script_sign.cpp index 8d9d364069..63b9f5b642 100644 --- a/src/script/api/script_sign.cpp +++ b/src/script/api/script_sign.cpp @@ -84,5 +84,5 @@ if (!ScriptObject::Command::Do(&ScriptInstance::DoCommandReturnSignID, location, text)) return INVALID_SIGN; /* In case of test-mode, we return SignID 0 */ - return ::SIGN_BEGIN; + return SignID::Begin(); } diff --git a/src/signs_base.h b/src/signs_base.h index 5775d7a90a..b208b21704 100644 --- a/src/signs_base.h +++ b/src/signs_base.h @@ -15,7 +15,7 @@ #include "core/pool_type.hpp" #include "company_type.h" -typedef Pool SignPool; +typedef Pool SignPool; extern SignPool _sign_pool; struct Sign : SignPool::PoolItem<&_sign_pool> { diff --git a/src/signs_type.h b/src/signs_type.h index f7243b8c1f..b7e12f13f6 100644 --- a/src/signs_type.h +++ b/src/signs_type.h @@ -11,11 +11,8 @@ #define SIGNS_TYPE_H /** The type of the IDs of signs. */ -enum SignID : uint16_t { - SIGN_BEGIN = 0, - SIGN_END = 64000, - INVALID_SIGN = 0xFFFF ///< Sentinel for an invalid sign. -}; +using SignID = PoolID; +static constexpr SignID INVALID_SIGN = SignID::Invalid(); ///< Sentinel for an invalid sign. struct Sign;