Use const auto references to avoid some copies

This commit is contained in:
Tim Wojtulewicz 2025-04-04 16:22:56 -07:00
parent 739efc79be
commit f7495831a2
5 changed files with 8 additions and 8 deletions

View file

@ -320,7 +320,7 @@ void CPPCompile::GenWhenStmt(const WhenInfo* wi, const std::string& when_lambda,
vector<string> local_aggrs) {
auto is_return = wi->IsReturn() ? "true" : "false";
auto timeout = wi->TimeoutExpr();
auto timeout_val = timeout ? GenExpr(timeout, GEN_NATIVE) : "-1.0";
const auto& timeout_val = timeout ? GenExpr(timeout, GEN_NATIVE) : "-1.0";
Emit("{ // begin a new scope for internal variables");