summaryrefslogtreecommitdiffstats
path: root/src/core/templates.h
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-12-09 09:55:50 +0100
committerGitHub <noreply@github.com>2020-12-09 09:55:50 +0100
commitccbbde549e81a7d0e71228ad5c244da6c8bd287f (patch)
treeb05d46740914289c3e713579716ef7cfa0068244 /src/core/templates.h
parentVehicle cam object collision fix (diff)
parentsync with upstream (diff)
downloadre3-ccbbde549e81a7d0e71228ad5c244da6c8bd287f.tar
re3-ccbbde549e81a7d0e71228ad5c244da6c8bd287f.tar.gz
re3-ccbbde549e81a7d0e71228ad5c244da6c8bd287f.tar.bz2
re3-ccbbde549e81a7d0e71228ad5c244da6c8bd287f.tar.lz
re3-ccbbde549e81a7d0e71228ad5c244da6c8bd287f.tar.xz
re3-ccbbde549e81a7d0e71228ad5c244da6c8bd287f.tar.zst
re3-ccbbde549e81a7d0e71228ad5c244da6c8bd287f.zip
Diffstat (limited to 'src/core/templates.h')
-rw-r--r--src/core/templates.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/templates.h b/src/core/templates.h
index 704331c3..bb89814e 100644
--- a/src/core/templates.h
+++ b/src/core/templates.h
@@ -123,16 +123,16 @@ public:
return m_flags[handle>>8].u == (handle & 0xFF) ?
(T*)&m_entries[handle >> 8] : nil;
}
- int GetIndex(T *entry){
+ int GetIndex(T* entry) {
int i = GetJustIndex_NoFreeAssert(entry);
- return m_flags[i].u + (i<<8);
+ return m_flags[i].u + (i << 8);
}
- int GetJustIndex(T *entry){
+ int GetJustIndex(T* entry) {
int index = GetJustIndex_NoFreeAssert(entry);
assert(!IsFreeSlot(index));
return index;
}
- int GetJustIndex_NoFreeAssert(T* entry){
+ int GetJustIndex_NoFreeAssert(T* entry) {
int index = ((U*)entry - m_entries);
assert((U*)entry == (U*)&m_entries[index]); // cast is unsafe - check required
return index;