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:
Patric Stout
2021-05-31 22:26:44 +02:00
committed by GitHub
parent 956d761e3e
commit 9fff00ba20
41 changed files with 213 additions and 223 deletions

View File

@@ -15,6 +15,7 @@
#include "tile_type.h"
#include "vehicle_type.h"
#include "base_consist.h"
#include "saveload/saveload.h"
/** Unique identifier for an order backup. */
typedef uint8 OrderBackupID;
@@ -34,7 +35,7 @@ static const uint32 MAKE_ORDER_BACKUP_FLAG = 1U << 31;
*/
struct OrderBackup : OrderBackupPool::PoolItem<&_order_backup_pool>, BaseConsist {
private:
friend const struct SaveLoad *GetOrderBackupDescription(); ///< Saving and loading of order backups.
friend SaveLoadTable GetOrderBackupDescription(); ///< Saving and loading of order backups.
friend void Load_BKOR(); ///< Creating empty orders upon savegame loading.
uint32 user; ///< The user that requested the backup.
TileIndex tile; ///< Tile of the depot where the order was changed.