From c1a9fe6fbd736c9e3a93314b0721d8f2cb8a2052 Mon Sep 17 00:00:00 2001 From: glx22 Date: Wed, 9 Jun 2021 16:23:35 +0200 Subject: Codechange: Use static array of references to ChunkHandler --- src/saveload/cheat_sl.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/saveload/cheat_sl.cpp') diff --git a/src/saveload/cheat_sl.cpp b/src/saveload/cheat_sl.cpp index cef8b7e90..f68b5a5a5 100644 --- a/src/saveload/cheat_sl.cpp +++ b/src/saveload/cheat_sl.cpp @@ -75,8 +75,9 @@ static void Load_CHTS() if (!IsSavegameVersionBefore(SLV_RIFF_TO_ARRAY) && SlIterateArray() != -1) SlErrorCorrupt("Too many CHTS entries"); } -static const ChunkHandler cheat_chunk_handlers[] = { - { 'CHTS', Save_CHTS, Load_CHTS, nullptr, nullptr, CH_TABLE }, +static const ChunkHandler CHTS{ 'CHTS', Save_CHTS, Load_CHTS, nullptr, nullptr, CH_TABLE }; +static const ChunkHandlerRef cheat_chunk_handlers[] = { + CHTS, }; extern const ChunkHandlerTable _cheat_chunk_handlers(cheat_chunk_handlers); -- cgit v1.2.3-54-g00ecf