mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-03 07:34:53 +00:00
Add equality operators for indexed_vector/falco_{list,macro,rule}
Add an equality operator for indexed_vector. As indexed_vectors commonly hold falco lists/macros/rules, also add equality operators for those structs. For condition/sinsp_filter shared_ptrs, the operator checks that the shared_ptrs point to the same underlying memory. Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
This commit is contained in:
@@ -34,6 +34,9 @@ public:
|
||||
indexed_vector& operator=(indexed_vector&&) = default;
|
||||
indexed_vector(const indexed_vector&) = default;
|
||||
indexed_vector& operator=(const indexed_vector&) = default;
|
||||
bool operator==(const indexed_vector& rhs) const {
|
||||
return (this->m_entries == rhs.m_entries && this->m_index == rhs.m_index);
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Returns the number of elements
|
||||
|
Reference in New Issue
Block a user