mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +00:00
Convert Dictionary types to be templated classes
This has the fortunate side-effect of also making it so we can store the value objects as typed pointers, instead of void*.
This commit is contained in:
parent
15c0bd9b9d
commit
47e7fe2cd1
15 changed files with 1153 additions and 1284 deletions
|
@ -65,7 +65,7 @@ public:
|
|||
// For the current iteration, returns the corresponding value.
|
||||
ZVal IterValue()
|
||||
{
|
||||
auto tev = (*tbl_iter)->GetValue<TableEntryVal*>();
|
||||
auto tev = (*tbl_iter)->value;
|
||||
return ZVal(tev->GetVal(), aux->value_var_type);
|
||||
}
|
||||
|
||||
|
@ -88,8 +88,8 @@ private:
|
|||
// Associated auxiliary information.
|
||||
ZInstAux* aux = nullptr;
|
||||
|
||||
std::optional<DictIterator> tbl_iter;
|
||||
std::optional<DictIterator> tbl_end;
|
||||
std::optional<DictIterator<TableEntryVal>> tbl_iter;
|
||||
std::optional<DictIterator<TableEntryVal>> tbl_end;
|
||||
};
|
||||
|
||||
// Class for simple step-wise iteration across an integer range.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue