Replace remaining uses of std::deque with ring buffers

Cargo packet lists and associated save/load
This commit is contained in:
Jonathan G Rennison
2023-08-19 14:01:06 +01:00
parent b59a8dc21c
commit 23ad010d70
10 changed files with 120 additions and 121 deletions

View File

@@ -135,8 +135,8 @@ public:
class SlStationCargo : public DefaultSaveLoadHandler<SlStationCargo, GoodsEntry> {
public:
inline static const SaveLoad description[] = {
SLE_VAR(StationCargoPair, first, SLE_UINT16),
SLE_REFDEQUE(StationCargoPair, second, REF_CARGO_PACKET),
SLE_VAR(StationCargoPair, first, SLE_UINT16),
SLE_REFRING(StationCargoPair, second, REF_CARGO_PACKET),
};
inline const static SaveLoadCompatTable compat_description = _station_cargo_sl_compat;
@@ -227,7 +227,7 @@ public:
SLEG_CONDVAR("cargo_feeder_share", _cargo_feeder_share, SLE_FILE_U32 | SLE_VAR_I64, SLV_14, SLV_65),
SLEG_CONDVAR("cargo_feeder_share", _cargo_feeder_share, SLE_INT64, SLV_65, SLV_68),
SLE_CONDVAR(GoodsEntry, amount_fract, SLE_UINT8, SLV_150, SL_MAX_VERSION),
SLEG_CONDREFDEQUE("packets", _packets, REF_CARGO_PACKET, SLV_68, SLV_183),
SLEG_CONDREFRING("packets", _packets, REF_CARGO_PACKET, SLV_68, SLV_183),
SLEG_CONDVAR("old_num_dests", _old_num_dests, SLE_UINT32, SLV_183, SLV_SAVELOAD_LIST_LENGTH),
SLE_CONDVAR(GoodsEntry, cargo.reserved_count, SLE_UINT, SLV_181, SL_MAX_VERSION),
SLE_CONDVAR(GoodsEntry, link_graph, SLE_UINT16, SLV_183, SL_MAX_VERSION),