summaryrefslogtreecommitdiff
path: root/src/saveload/station_sl.cpp
diff options
context:
space:
mode:
authorglx22 <glx@openttd.org>2021-06-09 16:23:35 +0200
committerLoïc Guilloux <glx22@users.noreply.github.com>2021-07-06 22:29:08 +0200
commitc1a9fe6fbd736c9e3a93314b0721d8f2cb8a2052 (patch)
tree801fdadf7721c07033fff31bf4d04c3d5f6200a5 /src/saveload/station_sl.cpp
parentf371a5ad705e10940612475cc697091914a2c96a (diff)
downloadopenttd-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.cpp11
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);