mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +00:00
List: add method empty()
This commit is contained in:
parent
4c7b1fa619
commit
cdf4362c7d
1 changed files with 2 additions and 0 deletions
|
@ -135,6 +135,8 @@ public:
|
|||
num_entries = max_entries = 0;
|
||||
}
|
||||
|
||||
bool empty() const noexcept { return num_entries == 0; }
|
||||
|
||||
int length() const { return num_entries; }
|
||||
int max() const { return max_entries; }
|
||||
int resize(int new_size = 0) // 0 => size to fit current number of entries
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue