mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 02:28:21 +00:00
Tweak minor const-ref/std::move things in script-opt code
This commit is contained in:
parent
4b6369a333
commit
b66f4ad500
4 changed files with 9 additions and 9 deletions
|
@ -20,8 +20,8 @@ public:
|
|||
|
||||
StmtPtr Reduce(StmtPtr s)
|
||||
{
|
||||
reduction_root = s;
|
||||
return s->Reduce(this);
|
||||
reduction_root = std::move(s);
|
||||
return reduction_root->Reduce(this);
|
||||
}
|
||||
|
||||
const DefSetsMgr* GetDefSetsMgr() const { return mgr; }
|
||||
|
@ -45,7 +45,7 @@ public:
|
|||
|
||||
// This is called *prior* to pushing a new inline block, in
|
||||
// order to generate the equivalent of function parameters.
|
||||
NameExprPtr GenInlineBlockName(IDPtr id);
|
||||
NameExprPtr GenInlineBlockName(const IDPtr& id);
|
||||
|
||||
int NumNewLocals() const { return new_locals.size(); }
|
||||
|
||||
|
@ -141,7 +141,7 @@ public:
|
|||
// one (meant for calls in an Expr context) does not, to avoid
|
||||
// circularity.
|
||||
ExprPtr OptExpr(Expr* e);
|
||||
ExprPtr OptExpr(ExprPtr e)
|
||||
ExprPtr OptExpr(const ExprPtr& e)
|
||||
{ return OptExpr(e.get()); }
|
||||
|
||||
// This one for expressions appearing in an Expr context.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue