From 6a5f30e1a0b104e5ff6e77c9c15837a390eed986 Mon Sep 17 00:00:00 2001 From: fallenoak Date: Tue, 8 Dec 2020 23:26:09 -0600 Subject: [PATCH] chore(array): declare TSBaseArray::Count() as const --- storm/array/TSBaseArray.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/storm/array/TSBaseArray.hpp b/storm/array/TSBaseArray.hpp index 3cd1efb..ab91f04 100644 --- a/storm/array/TSBaseArray.hpp +++ b/storm/array/TSBaseArray.hpp @@ -15,17 +15,18 @@ class TSBaseArray { virtual int32_t MemLineNo() const; T& operator[](uint32_t i); - uint32_t Count(void); + uint32_t Count(void) const; void Clear(void); }; template T& TSBaseArray::operator[](uint32_t i) { + this->CheckArrayBounds(i); return this->m_data[i]; } template -uint32_t TSBaseArray::Count() { +uint32_t TSBaseArray::Count() const { return this->m_count; }