some code simplifications and streamlining

This commit is contained in:
Vern Paxson 2023-07-20 09:32:17 -07:00
parent 18c77ddc2c
commit 79c53c9ed6
11 changed files with 23 additions and 27 deletions

View file

@ -787,10 +787,10 @@ StmtPtr StmtList::DoReduce(Reducer* c)
bool StmtList::ReduceStmt(int& s_i, std::vector<StmtPtr>& f_stmts, Reducer* c)
{
bool did_change = false;
auto stmt = stmts[s_i];
auto old_stmt = stmt;
auto& stmt_i = stmts[s_i];
auto old_stmt = stmt_i.get();
stmt = stmt->Reduce(c);
auto stmt = stmt_i->Reduce(c);
if ( stmt != old_stmt )
did_change = true;