mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Scope: pass IntrusivePtr to AddInit()
This commit is contained in:
parent
9e00c28e48
commit
6e0d331267
2 changed files with 2 additions and 2 deletions
|
@ -73,7 +73,7 @@ public:
|
|||
id_list* GetInits();
|
||||
|
||||
// Adds a variable to the list.
|
||||
void AddInit(ID* id) { inits->push_back(id); }
|
||||
void AddInit(IntrusivePtr<ID> &&id) { inits->push_back(id.release()); }
|
||||
|
||||
void Describe(ODesc* d) const override;
|
||||
|
||||
|
|
|
@ -254,7 +254,7 @@ IntrusivePtr<Stmt> add_local(IntrusivePtr<ID> id, IntrusivePtr<BroType> t,
|
|||
|
||||
else
|
||||
{
|
||||
current_scope()->AddInit(id.release());
|
||||
current_scope()->AddInit(std::move(id));
|
||||
return make_intrusive<NullStmt>();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue