Changeset 45a091b for src/Concurrency/WaitforNew.cpp
- Timestamp:
- Nov 15, 2023, 11:55:59 AM (12 months ago)
- Branches:
- master
- Children:
- b8b5535
- Parents:
- 1ccae59
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Concurrency/WaitforNew.cpp
r1ccae59 r45a091b 450 450 ); 451 451 452 // For some reason, enumerate doesn't work here because of references. 453 for ( size_t i = 0 ; i < waitfor->clauses.size() ; ++i ) { 452 for ( const auto & [i, clause] : enumerate( waitfor->clauses ) ) { 454 453 theSwitch->cases.push_back( 455 454 new ast::CaseClause( location, … … 457 456 { 458 457 new ast::CompoundStmt( location, { 459 waitfor->clauses[i]->stmt,458 clause->stmt, 460 459 new ast::BranchStmt( location, 461 460 ast::BranchStmt::Break, … … 538 537 ast::Stmt * setter = makeSetter( location, flag ); 539 538 540 // For some reason, enumerate doesn't work here because of references. 541 for ( size_t i = 0 ; i < stmt->clauses.size() ; ++i ) { 542 init_clause( comp, acceptables, i, stmt->clauses[i], setter ); 539 for ( const auto & [i, clause] : enumerate( stmt->clauses ) ) { 540 init_clause( comp, acceptables, i, clause, setter ); 543 541 } 544 542
Note: See TracChangeset
for help on using the changeset viewer.