mirror of https://github.com/OpenTTD/OpenTTD.git
Cleanup: Remove old SaveLoad workarounds for MS VS 2017. (#12355)
This commit is contained in:
parent
e904122441
commit
df2ee7b06c
|
@ -329,17 +329,7 @@ public:
|
|||
|
||||
class SlStationGoods : public DefaultSaveLoadHandler<SlStationGoods, BaseStation> {
|
||||
public:
|
||||
#if defined(_MSC_VER) && (_MSC_VER == 1915 || _MSC_VER == 1916)
|
||||
/* This table access private members of other classes; they have this
|
||||
* class as friend. For MSVC CL 19.15 and 19.16 this doesn't work for
|
||||
* "inline static const", so we are forced to wrap the table in a
|
||||
* function. CL 19.16 is the latest for VS2017. */
|
||||
inline static const SaveLoad description[] = {{}};
|
||||
SaveLoadTable GetDescription() const override {
|
||||
#else
|
||||
inline
|
||||
#endif
|
||||
static const SaveLoad description[] = {
|
||||
inline static const SaveLoad description[] = {
|
||||
SLEG_CONDVAR("waiting_acceptance", _waiting_acceptance, SLE_UINT16, SL_MIN_VERSION, SLV_68),
|
||||
SLE_CONDVAR(GoodsEntry, status, SLE_UINT8, SLV_68, SL_MAX_VERSION),
|
||||
SLE_VAR(GoodsEntry, time_since_pickup, SLE_UINT8),
|
||||
|
@ -363,10 +353,7 @@ public:
|
|||
SLEG_CONDSTRUCTLIST("flow", SlStationFlow, SLV_183, SL_MAX_VERSION),
|
||||
SLEG_CONDSTRUCTLIST("cargo", SlStationCargo, SLV_183, SL_MAX_VERSION),
|
||||
};
|
||||
#if defined(_MSC_VER) && (_MSC_VER == 1915 || _MSC_VER == 1916)
|
||||
return description;
|
||||
}
|
||||
#endif
|
||||
|
||||
inline const static SaveLoadCompatTable compat_description = _station_goods_sl_compat;
|
||||
|
||||
/**
|
||||
|
|
|
@ -634,17 +634,7 @@ static Money _cargo_feeder_share;
|
|||
|
||||
class SlVehicleCommon : public DefaultSaveLoadHandler<SlVehicleCommon, Vehicle> {
|
||||
public:
|
||||
#if defined(_MSC_VER) && (_MSC_VER == 1915 || _MSC_VER == 1916)
|
||||
/* This table access private members of other classes; they have this
|
||||
* class as friend. For MSVC CL 19.15 and 19.16 this doesn't work for
|
||||
* "inline static const", so we are forced to wrap the table in a
|
||||
* function. CL 19.16 is the latest for VS2017. */
|
||||
inline static const SaveLoad description[] = {{}};
|
||||
SaveLoadTable GetDescription() const override {
|
||||
#else
|
||||
inline
|
||||
#endif
|
||||
static const SaveLoad description[] = {
|
||||
inline static const SaveLoad description[] = {
|
||||
SLE_VAR(Vehicle, subtype, SLE_UINT8),
|
||||
|
||||
SLE_REF(Vehicle, next, REF_VEHICLE_OLD),
|
||||
|
@ -773,10 +763,7 @@ public:
|
|||
SLE_CONDVAR(Vehicle, depot_unbunching_next_departure, SLE_UINT64, SLV_DEPOT_UNBUNCHING, SL_MAX_VERSION),
|
||||
SLE_CONDVAR(Vehicle, round_trip_time, SLE_INT32, SLV_DEPOT_UNBUNCHING, SL_MAX_VERSION),
|
||||
};
|
||||
#if defined(_MSC_VER) && (_MSC_VER == 1915 || _MSC_VER == 1916)
|
||||
return description;
|
||||
}
|
||||
#endif
|
||||
|
||||
inline const static SaveLoadCompatTable compat_description = _vehicle_common_sl_compat;
|
||||
|
||||
void Save(Vehicle *v) const override
|
||||
|
@ -982,17 +969,7 @@ public:
|
|||
|
||||
class SlVehicleDisaster : public DefaultSaveLoadHandler<SlVehicleDisaster, Vehicle> {
|
||||
public:
|
||||
#if defined(_MSC_VER) && (_MSC_VER == 1915 || _MSC_VER == 1916)
|
||||
/* This table access private members of other classes; they have this
|
||||
* class as friend. For MSVC CL 19.15 and 19.16 this doesn't work for
|
||||
* "inline static const", so we are forced to wrap the table in a
|
||||
* function. CL 19.16 is the latest for VS2017. */
|
||||
inline static const SaveLoad description[] = {{}};
|
||||
SaveLoadTable GetDescription() const override {
|
||||
#else
|
||||
inline
|
||||
#endif
|
||||
static const SaveLoad description[] = {
|
||||
inline static const SaveLoad description[] = {
|
||||
SLE_REF(Vehicle, next, REF_VEHICLE_OLD),
|
||||
|
||||
SLE_VAR(Vehicle, subtype, SLE_UINT8),
|
||||
|
@ -1026,10 +1003,7 @@ public:
|
|||
SLE_CONDVAR(DisasterVehicle, big_ufo_destroyer_target, SLE_UINT32, SLV_191, SL_MAX_VERSION),
|
||||
SLE_CONDVAR(DisasterVehicle, flags, SLE_UINT8, SLV_194, SL_MAX_VERSION),
|
||||
};
|
||||
#if defined(_MSC_VER) && (_MSC_VER == 1915 || _MSC_VER == 1916)
|
||||
return description;
|
||||
}
|
||||
#endif
|
||||
|
||||
inline const static SaveLoadCompatTable compat_description = _vehicle_disaster_sl_compat;
|
||||
|
||||
void Save(Vehicle *v) const override
|
||||
|
|
Loading…
Reference in New Issue