mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 18:48:20 +00:00
migrated some raw pointers to smart pointers
This commit is contained in:
parent
c23ee30542
commit
1b2cd0c767
14 changed files with 74 additions and 113 deletions
|
@ -777,8 +777,8 @@ StmtPtr ScriptFunc::AddInits(StmtPtr body, const std::vector<IDPtr>& inits)
|
|||
return body;
|
||||
|
||||
auto stmt_series = make_intrusive<StmtList>();
|
||||
stmt_series->Stmts().push_back(new InitStmt(inits));
|
||||
stmt_series->Stmts().push_back(body.release());
|
||||
stmt_series->Stmts().push_back(make_intrusive<InitStmt>(inits));
|
||||
stmt_series->Stmts().push_back(std::move(body));
|
||||
|
||||
return stmt_series;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue