refactor(userspace/engine): apply C++ best practices to newest engine classes

This include making a coherent use of const, remove private inheritance, and adding virtual destructors.

Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
This commit is contained in:
Jason Dellaluce
2022-04-21 08:49:11 +00:00
committed by poiana
parent be177795c2
commit a16eac221e
9 changed files with 118 additions and 84 deletions

View File

@@ -28,10 +28,12 @@ template <typename T>
class indexed_vector
{
public:
virtual ~indexed_vector() = default;
/*!
\brief Returns the number of elements
*/
virtual inline size_t size()
virtual inline size_t size() const
{
return m_entries.size();
}
@@ -39,7 +41,7 @@ public:
/*!
\brief Returns true if the vector is empty
*/
virtual inline bool empty()
virtual inline bool empty() const
{
return m_entries.empty();
}