Change BroType::ShallowClone() to return IntrusivePtr

This commit is contained in:
Jon Siwek 2020-05-06 15:53:52 -07:00
parent b05e5c7686
commit 89dd668aff
3 changed files with 28 additions and 26 deletions

View file

@ -363,7 +363,7 @@ void add_type(ID* id, IntrusivePtr<BroType> t, attr_list* attr)
tnew = std::move(t);
else
// Clone the type to preserve type name aliasing.
tnew = {AdoptRef{}, t->ShallowClone()};
tnew = t->ShallowClone();
BroType::AddAlias(new_type_name, tnew.get());