diff options
author | aap <aap@papnet.eu> | 2020-12-16 21:54:01 +0100 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-12-16 21:54:01 +0100 |
commit | 1af5065df708c47376a06e426ae2c10206a0373b (patch) | |
tree | 1da172a230f711262dd2eb0517e3570a8cbce43f /src/core/templates.h | |
parent | finished CMBlur (diff) | |
parent | Fixes and style changes (diff) | |
download | re3-1af5065df708c47376a06e426ae2c10206a0373b.tar re3-1af5065df708c47376a06e426ae2c10206a0373b.tar.gz re3-1af5065df708c47376a06e426ae2c10206a0373b.tar.bz2 re3-1af5065df708c47376a06e426ae2c10206a0373b.tar.lz re3-1af5065df708c47376a06e426ae2c10206a0373b.tar.xz re3-1af5065df708c47376a06e426ae2c10206a0373b.tar.zst re3-1af5065df708c47376a06e426ae2c10206a0373b.zip |
Diffstat (limited to 'src/core/templates.h')
-rw-r--r-- | src/core/templates.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/templates.h b/src/core/templates.h index bb89814e..43c8d8fc 100644 --- a/src/core/templates.h +++ b/src/core/templates.h @@ -129,12 +129,13 @@ public: } int GetJustIndex(T* entry) { int index = GetJustIndex_NoFreeAssert(entry); + assert((U*)entry == (U*)&m_entries[index]); // cast is unsafe - check required assert(!IsFreeSlot(index)); return index; } int GetJustIndex_NoFreeAssert(T* entry) { int index = ((U*)entry - m_entries); - assert((U*)entry == (U*)&m_entries[index]); // cast is unsafe - check required + // Please don't add unsafe assert here, because at least one func. use this to check if entity is ped or vehicle. return index; } int GetNoOfUsedSpaces(void) const { |