mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Remove check for redundant attributes
Letting there be redundant attributes serves no purpose. It could also potentially cause long attribute lists containing many useless &redef or &optional attributes (e.g. think that may happen if you use redef enough times and the new attributes keep getting merged into the old ones).
This commit is contained in:
parent
5265613a9e
commit
1a0a2f16ce
3 changed files with 3 additions and 8 deletions
|
@ -164,10 +164,8 @@ void Attributes::AddAttr(Attr* attr)
|
|||
if ( ! attrs )
|
||||
attrs = new attr_list(1);
|
||||
|
||||
if ( ! attr->RedundantAttrOkay() )
|
||||
// We overwrite old attributes by deleting them first.
|
||||
RemoveAttr(attr->Tag());
|
||||
|
||||
// We overwrite old attributes by deleting them first.
|
||||
RemoveAttr(attr->Tag());
|
||||
attrs->push_back(attr);
|
||||
Ref(attr);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue