summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Pigott <charlespigott@googlemail.com>2019-04-22 08:19:04 +0100
committerPeterN <peter@fuzzle.org>2019-04-29 17:40:22 +0100
commitfcf06ba4c43bb9b7ac0b8541377a5240b3e01126 (patch)
tree427308b546da85d58c7197b2ae4df4414b3719d4 /src
parent60e31c7cfa2a79afa37a0f2e76b592920e5388fe (diff)
downloadopenttd-fcf06ba4c43bb9b7ac0b8541377a5240b3e01126.tar.xz
Codechange: Remove StationClassIDByte, and drop STAT_CLASS_MAX by one
Diffstat (limited to 'src')
-rw-r--r--src/newgrf_station.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/newgrf_station.h b/src/newgrf_station.h
index 8f3bb6dce..eff76e57d 100644
--- a/src/newgrf_station.h
+++ b/src/newgrf_station.h
@@ -79,13 +79,12 @@ struct StationResolverObject : public ResolverObject {
const SpriteGroup *ResolveReal(const RealSpriteGroup *group) const override;
};
-enum StationClassID {
+enum StationClassID : byte {
STAT_CLASS_BEGIN = 0, ///< the lowest valid value
STAT_CLASS_DFLT = 0, ///< Default station class.
STAT_CLASS_WAYP, ///< Waypoint class.
- STAT_CLASS_MAX = 256, ///< Maximum number of classes.
+ STAT_CLASS_MAX = 255, ///< Maximum number of classes.
};
-typedef SimpleTinyEnumT<StationClassID, byte> StationClassIDByte;
template <> struct EnumPropsT<StationClassID> : MakeEnumPropsT<StationClassID, byte, STAT_CLASS_BEGIN, STAT_CLASS_MAX, STAT_CLASS_MAX, 8> {};
/** Allow incrementing of StationClassID variables */