mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-05 08:40:52 +00:00
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:
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user