mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 02:28:21 +00:00
ZAM fix for vector "in" operator
This commit is contained in:
parent
5569d81953
commit
6185d1c389
2 changed files with 3 additions and 5 deletions
|
@ -1593,10 +1593,8 @@ public:
|
|||
ValPtr ValAt(unsigned int index) const { return At(index); }
|
||||
|
||||
bool Has(unsigned int index) const
|
||||
// Version to use once std::optional implementation is merged.
|
||||
// { return index < vector_val->size() && vector_val[index]; }
|
||||
{
|
||||
return At(index) != nullptr;
|
||||
return index < vector_val->size() && (*vector_val)[index];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue