Change protected EnumVal ctor to use IntrusivePtr

This commit is contained in:
Jon Siwek 2020-05-14 20:44:38 -07:00
parent 440b0623ac
commit 902f93671c
2 changed files with 4 additions and 5 deletions

View file

@ -1011,9 +1011,8 @@ protected:
template<class T, class... Ts>
friend IntrusivePtr<T> make_intrusive(Ts&&... args);
EnumVal(EnumType* t, int i) : Val(bro_int_t(i), {NewRef{}, t})
{
}
EnumVal(IntrusivePtr<EnumType> t, int i) : Val(bro_int_t(i), std::move(t))
{}
void ValDescribe(ODesc* d) const override;
IntrusivePtr<Val> DoClone(CloneState* state) override;