mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 08:08:19 +00:00
Deprecate SetType::SetElements(), replace with SetType::Elements()
This commit is contained in:
parent
0f59b80d66
commit
9ab7150883
2 changed files with 6 additions and 2 deletions
|
@ -429,8 +429,12 @@ public:
|
|||
|
||||
IntrusivePtr<BroType> ShallowClone() override;
|
||||
|
||||
[[deprecated("Remove in v4.1. Use Elements() isntead.")]]
|
||||
ListExpr* SetElements() const { return elements.get(); }
|
||||
|
||||
const IntrusivePtr<ListExpr>& Elements() const
|
||||
{ return elements; }
|
||||
|
||||
protected:
|
||||
IntrusivePtr<ListExpr> elements;
|
||||
};
|
||||
|
|
|
@ -162,7 +162,7 @@ static void make_var(ID* id, IntrusivePtr<BroType> t, init_class c,
|
|||
if ( t && t->IsSet() )
|
||||
{ // Check for set with explicit elements.
|
||||
SetType* st = t->AsTableType()->AsSetType();
|
||||
ListExpr* elements = st->SetElements();
|
||||
const auto& elements = st->Elements();
|
||||
|
||||
if ( elements )
|
||||
{
|
||||
|
@ -172,7 +172,7 @@ static void make_var(ID* id, IntrusivePtr<BroType> t, init_class c,
|
|||
return;
|
||||
}
|
||||
|
||||
init = {NewRef{}, elements};
|
||||
init = elements;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue