summaryrefslogtreecommitdiff
path: root/src/saveload/company_sl.cpp
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-05-31 22:26:44 +0200
committerGitHub <noreply@github.com>2021-05-31 22:26:44 +0200
commit9fff00ba205260ee5e11b50f87a3edee9b7e76a3 (patch)
tree2c6ee1eb6f0df2539c9ed17a2ae05541518a7dc9 /src/saveload/company_sl.cpp
parent956d761e3ef1968c6470a9e78597c5531ed7c332 (diff)
downloadopenttd-9fff00ba205260ee5e11b50f87a3edee9b7e76a3.tar.xz
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.
Diffstat (limited to 'src/saveload/company_sl.cpp')
-rw-r--r--src/saveload/company_sl.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/saveload/company_sl.cpp b/src/saveload/company_sl.cpp
index 5770f9791..21d02121b 100644
--- a/src/saveload/company_sl.cpp
+++ b/src/saveload/company_sl.cpp
@@ -293,8 +293,6 @@ static const SaveLoad _company_desc[] = {
SLE_CONDVAR(CompanyProperties, terraform_limit, SLE_UINT32, SLV_156, SL_MAX_VERSION),
SLE_CONDVAR(CompanyProperties, clear_limit, SLE_UINT32, SLV_156, SL_MAX_VERSION),
SLE_CONDVAR(CompanyProperties, tree_limit, SLE_UINT32, SLV_175, SL_MAX_VERSION),
-
- SLE_END()
};
static const SaveLoad _company_settings_desc[] = {
@@ -314,8 +312,6 @@ static const SaveLoad _company_settings_desc[] = {
SLE_CONDVAR(Company, settings.vehicle.servint_ships, SLE_UINT16, SLV_120, SL_MAX_VERSION),
SLE_CONDNULL(63, SLV_2, SLV_144), // old reserved space
-
- SLE_END()
};
static const SaveLoad _company_settings_skip_desc[] = {
@@ -336,8 +332,6 @@ static const SaveLoad _company_settings_skip_desc[] = {
SLE_CONDNULL(2, SLV_120, SL_MAX_VERSION), // settings.vehicle.servint_ships
SLE_CONDNULL(63, SLV_2, SLV_144), // old reserved space
-
- SLE_END()
};
static const SaveLoad _company_economy_desc[] = {
@@ -353,8 +347,6 @@ static const SaveLoad _company_economy_desc[] = {
SLE_CONDARR(CompanyEconomyEntry, delivered_cargo, SLE_UINT32, 32, SLV_170, SLV_EXTEND_CARGOTYPES),
SLE_CONDARR(CompanyEconomyEntry, delivered_cargo, SLE_UINT32, NUM_CARGO, SLV_EXTEND_CARGOTYPES, SL_MAX_VERSION),
SLE_VAR(CompanyEconomyEntry, performance_history, SLE_INT32),
-
- SLE_END()
};
/* We do need to read this single value, as the bigger it gets, the more data is stored */
@@ -390,7 +382,6 @@ static const SaveLoad _company_ai_desc[] = {
SLE_CONDNULL(32, SL_MIN_VERSION, SLV_107),
SLE_CONDNULL(64, SLV_2, SLV_107),
- SLE_END()
};
static const SaveLoad _company_ai_build_rec_desc[] = {
@@ -399,14 +390,12 @@ static const SaveLoad _company_ai_build_rec_desc[] = {
SLE_CONDNULL(2, SL_MIN_VERSION, SLV_6),
SLE_CONDNULL(4, SLV_6, SLV_107),
SLE_CONDNULL(8, SL_MIN_VERSION, SLV_107),
- SLE_END()
};
static const SaveLoad _company_livery_desc[] = {
SLE_CONDVAR(Livery, in_use, SLE_UINT8, SLV_34, SL_MAX_VERSION),
SLE_CONDVAR(Livery, colour1, SLE_UINT8, SLV_34, SL_MAX_VERSION),
SLE_CONDVAR(Livery, colour2, SLE_UINT8, SLV_34, SL_MAX_VERSION),
- SLE_END()
};
static void SaveLoad_PLYR_common(Company *c, CompanyProperties *cprops)