Use 'Assert' instead

This commit is contained in:
Kawe Mazidjatari 2023-01-25 19:21:06 +01:00
parent d76ed1098a
commit 9ea06aa65d
2 changed files with 4 additions and 4 deletions

View File

@ -64,7 +64,7 @@ int CNetworkStringTable::GetEntryBits(void) const
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void CNetworkStringTable::SetTick(int tick_count) void CNetworkStringTable::SetTick(int tick_count)
{ {
assert(tick_count >= m_nTickCount); Assert(tick_count >= m_nTickCount);
m_nTickCount = tick_count; m_nTickCount = tick_count;
} }

View File

@ -23,7 +23,7 @@ inline uint32_t g_pHullMasks[10] = // Hull mask table [r5apex_ds.exe + 131a2f8].
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
dtNavMesh* GetNavMeshForHull(int hullSize) dtNavMesh* GetNavMeshForHull(int hullSize)
{ {
assert(hullSize >= NULL && hullSize < MAX_HULLS); // Programmer error. Assert(hullSize >= NULL && hullSize < MAX_HULLS); // Programmer error.
return g_pNavMesh[hullSize]; return g_pNavMesh[hullSize];
} }
@ -34,7 +34,7 @@ dtNavMesh* GetNavMeshForHull(int hullSize)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
uint32_t GetHullMaskById(int hullId) uint32_t GetHullMaskById(int hullId)
{ {
assert(hullId >= NULL && hullId < SDK_ARRAYSIZE(g_pHullMasks)); // Programmer error. Assert(hullId >= NULL && hullId < SDK_ARRAYSIZE(g_pHullMasks)); // Programmer error.
return (hullId + g_pHullMasks[hullId]); return (hullId + g_pHullMasks[hullId]);
} }
@ -98,7 +98,7 @@ bool Detour_IsLoaded()
} }
} }
assert(ret <= MAX_HULLS); Assert(ret <= MAX_HULLS);
return (ret != MAX_HULLS); return (ret != MAX_HULLS);
} }