Codefix: Avoid type-casting function pointer with incorrect type. (#12929)

Make `AutolengthProc` take `int` instead of `void *`, avoiding pointer parameters.
This commit is contained in:
Peter Nelson
2024-09-12 06:49:45 +01:00
committed by GitHub
parent 9631c68ce6
commit 7f5a3eaf83
4 changed files with 8 additions and 8 deletions

View File

@@ -32,7 +32,7 @@ static const SaveLoad _game_script_desc[] = {
SLEG_VAR("version", _game_saveload_version, SLE_UINT32),
};
static void SaveReal_GSDT(int *)
static void SaveReal_GSDT(int)
{
GameConfig *config = GameConfig::GetConfig();
@@ -109,7 +109,7 @@ struct GSDTChunkHandler : ChunkHandler {
{
SlTableHeader(_game_script_desc);
SlSetArrayIndex(0);
SlAutolength((AutolengthProc *)SaveReal_GSDT, nullptr);
SlAutolength(SaveReal_GSDT, 0);
}
};