diff --git a/source/sw/src/save.cpp b/source/sw/src/save.cpp index 655051b2c..dc938eb23 100644 --- a/source/sw/src/save.cpp +++ b/source/sw/src/save.cpp @@ -171,7 +171,7 @@ int SaveSymDataInfo(MFILE_WRITE fil, void *ptr) return 0; } -int SaveSymCodeInfo(MFILE_WRITE fil, void *ptr) +static int SaveSymCodeInfo_raw(MFILE_WRITE fil, void *ptr) { savedcodesym sym; @@ -192,6 +192,11 @@ int SaveSymCodeInfo(MFILE_WRITE fil, void *ptr) return 0; } +template +static int SaveSymCodeInfo(MFILE_WRITE fil, T * ptr) +{ + return SaveSymCodeInfo_raw(fil, (void *)ptr); +} int LoadSymDataInfo(MFILE_READ fil, void **ptr) { diff --git a/source/sw/src/text.cpp b/source/sw/src/text.cpp index 75baae318..9d5faaf10 100644 --- a/source/sw/src/text.cpp +++ b/source/sw/src/text.cpp @@ -171,7 +171,7 @@ PutStringTimer(PLAYERp pp, short x, short y, const char *string, short seconds) extern unsigned short xlatfont[]; long kill_tics; short id, ac; - void *func; + PANEL_SPRITE_FUNCp func; offset = x; @@ -200,7 +200,7 @@ PutStringTimer(PLAYERp pp, short x, short y, const char *string, short seconds) if (c > asc_Space && c < 127) { nsp = pSpawnFullViewSprite(pp, ac, PRI_FRONT_MAX, offset, y); - nsp->PanelSpriteFunc = (PANEL_SPRITE_FUNCp)func; + nsp->PanelSpriteFunc = func; nsp->kill_tics = kill_tics; nsp->ID = id; offset += tilesiz[ac].x;