Codechange: [Script] replace some enums with constexpr values of the internal type

This commit is contained in:
Rubidium
2025-01-31 17:29:44 +01:00
committed by rubidium42
parent b4e3425a5f
commit b6bdb97bed
12 changed files with 33 additions and 64 deletions

View File

@@ -19,15 +19,9 @@
*/
class ScriptGroup : public ScriptObject {
public:
/**
* The group IDs of some special groups.
*/
enum GroupID {
/* Note: these values represent part of the in-game static values */
GROUP_ALL = ::ALL_GROUP, ///< All vehicles are in this group.
GROUP_DEFAULT = ::DEFAULT_GROUP, ///< Vehicles not put in any other group are in this one.
GROUP_INVALID = ::INVALID_GROUP, ///< An invalid group id.
};
static constexpr GroupID GROUP_ALL = ::ALL_GROUP; ///< All vehicles are in this group.
static constexpr GroupID GROUP_DEFAULT = ::DEFAULT_GROUP; ///< Vehicles not put in any other group are in this one.
static constexpr GroupID GROUP_INVALID = ::INVALID_GROUP; ///< An invalid group id.
/**
* Checks whether the given group is valid.