mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 17:48:21 +00:00
Add ability to grow/shrink a vector using slicing, also adds Insert/Remove methods for VectorVal
This commit is contained in:
parent
23f9fb0ae9
commit
502ad9abc3
5 changed files with 61 additions and 9 deletions
|
@ -1194,6 +1194,12 @@ public:
|
|||
// Won't shrink size.
|
||||
unsigned int ResizeAtLeast(unsigned int new_num_elements);
|
||||
|
||||
// Insert an element at a specific position into the underlying vector.
|
||||
bool Insert(unsigned int index, Val* element);
|
||||
|
||||
// Removes an element or a range of elements from a specific position.
|
||||
bool Remove(unsigned int start_index);
|
||||
|
||||
protected:
|
||||
friend class Val;
|
||||
VectorVal() { }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue