Codechange: C++-ify lists for SaveLoad (#9323)
Basically, this changes "SaveLoad *" to either: 1) "SaveLoadTable" if a list of SaveLoads was meant 2) "SaveLoad &" if a single entry was meant As added bonus, this removes SL_END / SLE_END / SLEG_END. This also adds core/span.hpp, a "std::span"-lite.
This commit is contained in:
@@ -83,7 +83,7 @@
|
||||
* some of the variables itself are private.
|
||||
* @return the saveload description for CargoPackets.
|
||||
*/
|
||||
const SaveLoad *GetCargoPacketDesc()
|
||||
SaveLoadTable GetCargoPacketDesc()
|
||||
{
|
||||
static const SaveLoad _cargopacket_desc[] = {
|
||||
SLE_VAR(CargoPacket, source, SLE_UINT16),
|
||||
@@ -97,8 +97,6 @@ const SaveLoad *GetCargoPacketDesc()
|
||||
|
||||
/* Used to be paid_for, but that got changed. */
|
||||
SLE_CONDNULL(1, SL_MIN_VERSION, SLV_121),
|
||||
|
||||
SLE_END()
|
||||
};
|
||||
return _cargopacket_desc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user