summaryrefslogtreecommitdiffstats
path: root/src/templates.h
diff options
context:
space:
mode:
author_AG <gennariarmando@outlook.com>2019-06-20 11:26:15 +0200
committer_AG <gennariarmando@outlook.com>2019-06-20 11:26:43 +0200
commit30d52079a45b7177fad00580f31ac3780c5a23b5 (patch)
tree052fc5a6c687983435f8d0b871b2d9abff31f747 /src/templates.h
parentUpdate Radar.cpp (diff)
downloadre3-30d52079a45b7177fad00580f31ac3780c5a23b5.tar
re3-30d52079a45b7177fad00580f31ac3780c5a23b5.tar.gz
re3-30d52079a45b7177fad00580f31ac3780c5a23b5.tar.bz2
re3-30d52079a45b7177fad00580f31ac3780c5a23b5.tar.lz
re3-30d52079a45b7177fad00580f31ac3780c5a23b5.tar.xz
re3-30d52079a45b7177fad00580f31ac3780c5a23b5.tar.zst
re3-30d52079a45b7177fad00580f31ac3780c5a23b5.zip
Diffstat (limited to 'src/templates.h')
-rw-r--r--src/templates.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/templates.h b/src/templates.h
index 82a94506..65f92a2a 100644
--- a/src/templates.h
+++ b/src/templates.h
@@ -82,8 +82,8 @@ public:
return m_flags[i].free ? nil : (T*)&m_entries[i];
}
T *GetAt(int handle){
- return m_flags[handle>>8].u == handle & 0xFF ?
- nil : (T*)&m_entries[handle >> 8];
+ return m_flags[handle>>8].u == (handle & 0xFF) ?
+ (T*)&m_entries[handle >> 8] : nil;
}
int GetIndex(T *entry){
int i = GetJustIndex(entry);