mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 23:58:20 +00:00
avoid constructing TypeList's on-the-fly for ListVal's with fixed types
This commit is contained in:
parent
1d5bc841e0
commit
6b0d595dae
3 changed files with 16 additions and 3 deletions
|
@ -661,8 +661,15 @@ private:
|
|||
class ListVal final : public Val
|
||||
{
|
||||
public:
|
||||
// Constructor used to build up a homogeneous list of values;
|
||||
// or, if 't' is TYPE_ANY, then a heterogeneous one whose type
|
||||
// is built up as values are appended.
|
||||
explicit ListVal(TypeTag t);
|
||||
|
||||
// Constructor used to build the list in one shot, with the type
|
||||
// pre-computed.
|
||||
ListVal(TypeListPtr tl, std::vector<ValPtr> vals);
|
||||
|
||||
~ListVal() override = default;
|
||||
|
||||
TypeTag BaseTag() const { return tag; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue