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

@@ -152,9 +152,11 @@ static void Load_VIEW()
if (!IsSavegameVersionBefore(SLV_RIFF_TO_ARRAY) && SlIterateArray() != -1) SlErrorCorrupt("Too many DATE entries");
}
static const ChunkHandler misc_chunk_handlers[] = {
{ 'DATE', Save_DATE, Load_DATE, nullptr, Check_DATE, CH_TABLE },
{ 'VIEW', Save_VIEW, Load_VIEW, nullptr, nullptr, CH_TABLE },
static const ChunkHandler DATE{ 'DATE', Save_DATE, Load_DATE, nullptr, Check_DATE, CH_TABLE };
static const ChunkHandler VIEW{ 'VIEW', Save_VIEW, Load_VIEW, nullptr, nullptr, CH_TABLE };
static const ChunkHandlerRef misc_chunk_handlers[] = {
DATE,
VIEW,
};
extern const ChunkHandlerTable _misc_chunk_handlers(misc_chunk_handlers);