summaryrefslogtreecommitdiffstats
path: root/src/core/templates.h
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-05-09 21:18:00 +0200
committerGitHub <noreply@github.com>2020-05-09 21:18:00 +0200
commite4683a30741f9528aa0f62fc259660b66c53bbec (patch)
tree38b775b96a2f1bc3ef0020275bf6c18a5a0c310b /src/core/templates.h
parentback to ped.ifp (diff)
parentnew curves + boat fix (diff)
downloadre3-e4683a30741f9528aa0f62fc259660b66c53bbec.tar
re3-e4683a30741f9528aa0f62fc259660b66c53bbec.tar.gz
re3-e4683a30741f9528aa0f62fc259660b66c53bbec.tar.bz2
re3-e4683a30741f9528aa0f62fc259660b66c53bbec.tar.lz
re3-e4683a30741f9528aa0f62fc259660b66c53bbec.tar.xz
re3-e4683a30741f9528aa0f62fc259660b66c53bbec.tar.zst
re3-e4683a30741f9528aa0f62fc259660b66c53bbec.zip
Diffstat (limited to '')
-rw-r--r--src/core/templates.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/templates.h b/src/core/templates.h
index aa71fe5d..465e3bef 100644
--- a/src/core/templates.h
+++ b/src/core/templates.h
@@ -133,7 +133,7 @@ public:
// TODO: the cast is unsafe
return (int)((U*)entry - m_entries);
}
- int GetNoOfUsedSpaces(void){
+ int GetNoOfUsedSpaces(void) const {
int i;
int n = 0;
for(i = 0; i < m_size; i++)
@@ -164,6 +164,7 @@ public:
memcpy(entries, m_entries, sizeof(U)*m_size);
debug("Stored:%d (/%d)\n", GetNoOfUsedSpaces(), m_size); /* Assumed inlining */
}
+ int32 GetNoOfFreeSpaces() const { return GetSize() - GetNoOfUsedSpaces(); }
};
template<typename T>