Changeset f22b170b for src/Concurrency


Ignore:
Timestamp:
Nov 16, 2023, 9:22:34 AM (2 years ago)
Author:
caparson <caparson@…>
Branches:
master
Children:
aad677d
Parents:
89a8bab (diff), b8b5535 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Concurrency/WaitforNew.cpp

    r89a8bab rf22b170b  
    450450        );
    451451
    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 ) ) {
    454453                theSwitch->cases.push_back(
    455454                        new ast::CaseClause( location,
     
    457456                                {
    458457                                        new ast::CompoundStmt( location, {
    459                                                 waitfor->clauses[i]->stmt,
     458                                                clause->stmt,
    460459                                                new ast::BranchStmt( location,
    461460                                                        ast::BranchStmt::Break,
     
    538537        ast::Stmt       * setter      = makeSetter( location, flag );
    539538
    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 );
    543541        }
    544542
Note: See TracChangeset for help on using the changeset viewer.