diff options
author | glx22 <glx@openttd.org> | 2021-06-09 16:23:35 +0200 |
---|---|---|
committer | Loïc Guilloux <glx22@users.noreply.github.com> | 2021-07-06 22:29:08 +0200 |
commit | c1a9fe6fbd736c9e3a93314b0721d8f2cb8a2052 (patch) | |
tree | 801fdadf7721c07033fff31bf4d04c3d5f6200a5 /src/saveload/station_sl.cpp | |
parent | f371a5ad705e10940612475cc697091914a2c96a (diff) | |
download | openttd-c1a9fe6fbd736c9e3a93314b0721d8f2cb8a2052.tar.xz |
Codechange: Use static array of references to ChunkHandler
Diffstat (limited to 'src/saveload/station_sl.cpp')
-rw-r--r-- | src/saveload/station_sl.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/saveload/station_sl.cpp b/src/saveload/station_sl.cpp index d9978cd6f..5662e4a46 100644 --- a/src/saveload/station_sl.cpp +++ b/src/saveload/station_sl.cpp @@ -719,10 +719,13 @@ static void Ptrs_ROADSTOP() } } -static const ChunkHandler station_chunk_handlers[] = { - { 'STNS', nullptr, Load_STNS, Ptrs_STNS, nullptr, CH_READONLY }, - { 'STNN', Save_STNN, Load_STNN, Ptrs_STNN, nullptr, CH_TABLE }, - { 'ROAD', Save_ROADSTOP, Load_ROADSTOP, Ptrs_ROADSTOP, nullptr, CH_TABLE }, +static const ChunkHandler STNS{ 'STNS', nullptr, Load_STNS, Ptrs_STNS, nullptr, CH_READONLY }; +static const ChunkHandler STNN{ 'STNN', Save_STNN, Load_STNN, Ptrs_STNN, nullptr, CH_TABLE }; +static const ChunkHandler ROAD{ 'ROAD', Save_ROADSTOP, Load_ROADSTOP, Ptrs_ROADSTOP, nullptr, CH_TABLE }; +static const ChunkHandlerRef station_chunk_handlers[] = { + STNS, + STNN, + ROAD, }; extern const ChunkHandlerTable _station_chunk_handlers(station_chunk_handlers); |