diff options
author | Peter Nelson <peter1138@openttd.org> | 2019-01-26 01:48:40 +0000 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2019-02-02 21:39:06 +0000 |
commit | 9de12521ecec338160c37920e65fd02c0c742bef (patch) | |
tree | 66f41585907f29ddbe22bb340c34bd23bffa58bd /src/saveload/autoreplace_sl.cpp | |
parent | ea4ea628163c735db4c4714966c9bc1c560e0f61 (diff) | |
download | openttd-9de12521ecec338160c37920e65fd02c0c742bef.tar.xz |
Codechange: Convert saveload numbers to enum values.
(This was mostly achieved with a few in-place regexes)
Diffstat (limited to 'src/saveload/autoreplace_sl.cpp')
-rw-r--r-- | src/saveload/autoreplace_sl.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/saveload/autoreplace_sl.cpp b/src/saveload/autoreplace_sl.cpp index 99e945503..1798df1ad 100644 --- a/src/saveload/autoreplace_sl.cpp +++ b/src/saveload/autoreplace_sl.cpp @@ -21,8 +21,8 @@ static const SaveLoad _engine_renew_desc[] = { SLE_VAR(EngineRenew, to, SLE_UINT16), SLE_REF(EngineRenew, next, REF_ENGINE_RENEWS), - SLE_CONDVAR(EngineRenew, group_id, SLE_UINT16, 60, SL_MAX_VERSION), - SLE_CONDVAR(EngineRenew, replace_when_old, SLE_BOOL, 175, SL_MAX_VERSION), + SLE_CONDVAR(EngineRenew, group_id, SLE_UINT16, SLV_60, SL_MAX_VERSION), + SLE_CONDVAR(EngineRenew, replace_when_old, SLE_BOOL, SLV_175, SL_MAX_VERSION), SLE_END() }; @@ -45,9 +45,9 @@ static void Load_ERNW() SlObject(er, _engine_renew_desc); /* Advanced vehicle lists, ungrouped vehicles got added */ - if (IsSavegameVersionBefore(60)) { + if (IsSavegameVersionBefore(SLV_60)) { er->group_id = ALL_GROUP; - } else if (IsSavegameVersionBefore(71)) { + } else if (IsSavegameVersionBefore(SLV_71)) { if (er->group_id == DEFAULT_GROUP) er->group_id = ALL_GROUP; } } |