mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Remove superflous std::move's from Inliner return values
This commit is contained in:
parent
09d12c3716
commit
4824da0325
1 changed files with 5 additions and 5 deletions
|
@ -163,25 +163,25 @@ ExprPtr Inliner::CheckForInlining(IntrusivePtr<CallExpr> c)
|
||||||
|
|
||||||
if ( f->Tag() != EXPR_NAME )
|
if ( f->Tag() != EXPR_NAME )
|
||||||
// We don't inline indirect calls.
|
// We don't inline indirect calls.
|
||||||
return std::move(c);
|
return c;
|
||||||
|
|
||||||
auto n = f->AsNameExpr();
|
auto n = f->AsNameExpr();
|
||||||
auto func = n->Id();
|
auto func = n->Id();
|
||||||
|
|
||||||
if ( ! func->IsGlobal() )
|
if ( ! func->IsGlobal() )
|
||||||
return std::move(c);
|
return c;
|
||||||
|
|
||||||
const auto& func_v = func->GetVal();
|
const auto& func_v = func->GetVal();
|
||||||
if ( ! func_v )
|
if ( ! func_v )
|
||||||
return std::move(c);
|
return c;
|
||||||
|
|
||||||
auto func_vf = func_v->AsFunc()->AsScriptFunc();
|
auto func_vf = func_v->AsFunc()->AsScriptFunc();
|
||||||
|
|
||||||
if ( ! func_vf )
|
if ( ! func_vf )
|
||||||
return std::move(c);
|
return c;
|
||||||
|
|
||||||
if ( inline_ables.count(func_vf) == 0 )
|
if ( inline_ables.count(func_vf) == 0 )
|
||||||
return std::move(c);
|
return c;
|
||||||
|
|
||||||
ListExprPtr args = {NewRef{}, c->Args()};
|
ListExprPtr args = {NewRef{}, c->Args()};
|
||||||
auto body = func_vf->GetBodies()[0].stmts; // there's only 1 body
|
auto body = func_vf->GetBodies()[0].stmts; // there's only 1 body
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue