const correctness that I didn't have another commit to squash into

git-svn-id: https://svn.eduke32.com/eduke32@7648 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2019-05-19 03:54:17 +00:00 committed by Christoph Oelckers
parent 0cbb1df2d1
commit 6db4ac3b01
3 changed files with 9 additions and 9 deletions

View file

@ -77,7 +77,7 @@ enum
#if !defined LUNATIC #if !defined LUNATIC
extern intptr_t const * insptr; extern intptr_t const * insptr;
extern void VM_ScriptInfo(intptr_t const *ptr, int range); void VM_ScriptInfo(intptr_t const * const ptr, int const range);
#endif #endif
extern hashtable_t h_gamefuncs; extern hashtable_t h_gamefuncs;

View file

@ -77,7 +77,7 @@ GAMEEXEC_STATIC void VM_Execute(bool const loop = false);
#endif #endif
#if !defined LUNATIC #if !defined LUNATIC
void VM_ScriptInfo(intptr_t const *ptr, int range) void VM_ScriptInfo(intptr_t const * const ptr, int const range)
{ {
if (!apScript || !ptr || g_currentEvent == -1) if (!apScript || !ptr || g_currentEvent == -1)
return; return;
@ -202,7 +202,7 @@ static FORCE_INLINE int32_t VM_EventInlineInternal__(int const &eventNum, int co
} }
#endif #endif
// the idea here is that the compiler inlines the call to VM_OnEvent_Internal__() and gives us a set of // the idea here is that the compiler inlines the call to VM_EventInlineInternal__() and gives us a set of
// functions which are optimized further based on distance/return having values known at compile time // functions which are optimized further based on distance/return having values known at compile time
int32_t VM_ExecuteEvent(int const nEventID, int const spriteNum, int const playerNum, int const nDist, int32_t const nReturn) int32_t VM_ExecuteEvent(int const nEventID, int const spriteNum, int const playerNum, int const nDist, int32_t const nReturn)
@ -312,7 +312,7 @@ bool A_Dodge(spritetype * const pSprite)
return 0; return 0;
} }
int A_GetFurthestAngle(int spriteNum, int angDiv) int A_GetFurthestAngle(int const spriteNum, int const angDiv)
{ {
auto const pSprite = (uspriteptr_t)&sprite[spriteNum]; auto const pSprite = (uspriteptr_t)&sprite[spriteNum];
@ -6221,7 +6221,7 @@ badindex:
} }
// NORECURSE // NORECURSE
void A_LoadActor(int32_t spriteNum) void A_LoadActor(int const spriteNum)
{ {
vm.spriteNum = spriteNum; // Sprite ID vm.spriteNum = spriteNum; // Sprite ID
vm.pSprite = &sprite[spriteNum]; // Pointer to sprite structure vm.pSprite = &sprite[spriteNum]; // Pointer to sprite structure
@ -6252,7 +6252,7 @@ void A_LoadActor(int32_t spriteNum)
} }
#endif #endif
void VM_UpdateAnim(int spriteNum, int32_t *pData) void VM_UpdateAnim(int const spriteNum, int32_t * const pData)
{ {
#if !defined LUNATIC #if !defined LUNATIC
size_t const actionofs = AC_ACTION_ID(pData); size_t const actionofs = AC_ACTION_ID(pData);

View file

@ -85,7 +85,7 @@ extern int32_t g_tw;
extern int32_t g_errorLineNum; extern int32_t g_errorLineNum;
extern int32_t g_currentEvent; extern int32_t g_currentEvent;
void A_LoadActor(int32_t spriteNum); void A_LoadActor(int const spriteNum);
#endif #endif
extern uint32_t g_eventCalls[MAXEVENTS], g_actorCalls[MAXTILES]; extern uint32_t g_eventCalls[MAXEVENTS], g_actorCalls[MAXTILES];
@ -93,7 +93,7 @@ extern double g_eventTotalMs[MAXEVENTS], g_actorTotalMs[MAXTILES], g_actorMinMs[
void A_Execute(int spriteNum, int playerNum, int playerDist); void A_Execute(int spriteNum, int playerNum, int playerDist);
void A_Fall(int spriteNum); void A_Fall(int spriteNum);
int A_GetFurthestAngle(int spriteNum, int angDiv); int A_GetFurthestAngle(int const spriteNum, int const angDiv);
void A_GetZLimits(int spriteNum); void A_GetZLimits(int spriteNum);
int __fastcall G_GetAngleDelta(int currAngle, int newAngle); int __fastcall G_GetAngleDelta(int currAngle, int newAngle);
void G_RestoreMapState(); void G_RestoreMapState();
@ -137,7 +137,7 @@ int32_t VM_ResetPlayer2(int32_t snum, int32_t flags);
int32_t VM_CheckSquished2(int32_t i, int32_t snum); int32_t VM_CheckSquished2(int32_t i, int32_t snum);
#endif #endif
void VM_UpdateAnim(int spriteNum, int32_t *pData); void VM_UpdateAnim(int const spriteNum, int32_t * const pData);
#ifdef __cplusplus #ifdef __cplusplus
} }