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

@@ -127,9 +127,11 @@ static void LoadPickup()
}
/** Chunk definition of the cargomonitoring maps. */
extern const ChunkHandler cargomonitor_chunk_handlers[] = {
{ 'CMDL', SaveDelivery, LoadDelivery, nullptr, nullptr, CH_TABLE },
{ 'CMPU', SavePickup, LoadPickup, nullptr, nullptr, CH_TABLE },
static const ChunkHandler CMDL{ 'CMDL', SaveDelivery, LoadDelivery, nullptr, nullptr, CH_TABLE };
static const ChunkHandler CMPU{ 'CMPU', SavePickup, LoadPickup, nullptr, nullptr, CH_TABLE };
static const ChunkHandlerRef cargomonitor_chunk_handlers[] = {
CMDL,
CMPU,
};
extern const ChunkHandlerTable _cargomonitor_chunk_handlers(cargomonitor_chunk_handlers);