diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-05-09 19:21:13 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-05-09 19:21:13 +0200 |
commit | a55e738dfad92ae7e23e45c3593384b9469f1177 (patch) | |
tree | e3714c0badf493db709cbf516cc7f9611f57e38f /src/core/templates.h | |
parent | fix (diff) | |
download | re3-a55e738dfad92ae7e23e45c3593384b9469f1177.tar re3-a55e738dfad92ae7e23e45c3593384b9469f1177.tar.gz re3-a55e738dfad92ae7e23e45c3593384b9469f1177.tar.bz2 re3-a55e738dfad92ae7e23e45c3593384b9469f1177.tar.lz re3-a55e738dfad92ae7e23e45c3593384b9469f1177.tar.xz re3-a55e738dfad92ae7e23e45c3593384b9469f1177.tar.zst re3-a55e738dfad92ae7e23e45c3593384b9469f1177.zip |
Diffstat (limited to '')
-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 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> |