Merge branch 'master' into jgrpp
Remove 'byte' typedef
This commit is contained in:
@@ -19,7 +19,7 @@ struct Town;
|
||||
typedef std::vector<TownID> TownList;
|
||||
|
||||
/** Supported initial town sizes */
|
||||
enum TownSize {
|
||||
enum TownSize : uint8_t {
|
||||
TSZ_SMALL, ///< Small town.
|
||||
TSZ_MEDIUM, ///< Medium town.
|
||||
TSZ_LARGE, ///< Large town.
|
||||
@@ -27,7 +27,7 @@ enum TownSize {
|
||||
|
||||
TSZ_END, ///< Number of available town sizes.
|
||||
};
|
||||
template <> struct EnumPropsT<TownSize> : MakeEnumPropsT<TownSize, byte, TSZ_SMALL, TSZ_END, TSZ_END, 2> {};
|
||||
template <> struct EnumPropsT<TownSize> : MakeEnumPropsT<TownSize, uint8_t, TSZ_SMALL, TSZ_END, TSZ_END, 2> {};
|
||||
DECLARE_ENUM_AS_ADDABLE(TownSize)
|
||||
|
||||
enum Ratings {
|
||||
@@ -81,7 +81,7 @@ enum Ratings {
|
||||
};
|
||||
|
||||
/** Town Layouts. It needs to be 8bits, because we save and load it as such */
|
||||
enum TownLayout : byte {
|
||||
enum TownLayout : uint8_t {
|
||||
TL_BEGIN = 0,
|
||||
TL_ORIGINAL = 0, ///< Original algorithm (min. 1 distance between roads)
|
||||
TL_BETTER_ROADS, ///< Extended original algorithm (min. 2 distance between roads)
|
||||
@@ -92,11 +92,11 @@ enum TownLayout : byte {
|
||||
|
||||
NUM_TLS, ///< Number of town layouts
|
||||
};
|
||||
template <> struct EnumPropsT<TownLayout> : MakeEnumPropsT<TownLayout, byte, TL_BEGIN, NUM_TLS, NUM_TLS, 3> {};
|
||||
template <> struct EnumPropsT<TownLayout> : MakeEnumPropsT<TownLayout, uint8_t, TL_BEGIN, NUM_TLS, NUM_TLS, 3> {};
|
||||
DECLARE_ENUM_AS_ADDABLE(TownLayout)
|
||||
|
||||
/** Town founding setting values. It needs to be 8bits, because we save and load it as such */
|
||||
enum TownFounding : byte {
|
||||
enum TownFounding : uint8_t {
|
||||
TF_BEGIN = 0, ///< Used for iterations and limit testing
|
||||
TF_FORBIDDEN = 0, ///< Forbidden
|
||||
TF_ALLOWED, ///< Allowed
|
||||
@@ -105,7 +105,7 @@ enum TownFounding : byte {
|
||||
};
|
||||
|
||||
/** Town cargo generation modes */
|
||||
enum TownCargoGenMode : byte {
|
||||
enum TownCargoGenMode : uint8_t {
|
||||
TCGM_BEGIN = 0,
|
||||
TCGM_ORIGINAL = 0, ///< Original algorithm (quadratic cargo by population)
|
||||
TCGM_BITCOUNT, ///< Bit-counted algorithm (normal distribution from individual house population)
|
||||
@@ -134,7 +134,7 @@ struct TransportedCargoStat {
|
||||
|
||||
|
||||
/** Town allow tunnel building setting values. It needs to be 8bits, because we save and load it as such */
|
||||
enum TownTunnelMode : byte {
|
||||
enum TownTunnelMode : uint8_t {
|
||||
TTM_BEGIN = 0, ///< Used for iterations and limit testing
|
||||
TTM_FORBIDDEN = 0, ///< Forbidden
|
||||
TTM_OBSTRUCTION_ONLY, ///< Allowed only for tunnels under obstructions
|
||||
|
||||
Reference in New Issue
Block a user