Codechange: Use static array of references to ChunkHandler

This commit is contained in:
glx22
2021-06-09 16:23:35 +02:00
committed by Loïc Guilloux
parent f371a5ad70
commit c1a9fe6fbd
35 changed files with 174 additions and 108 deletions

View File

@@ -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);