Skip to content

Commit

Permalink
Use clearer C++11 auto
Browse files Browse the repository at this point in the history
  • Loading branch information
bpbond committed Apr 3, 2022
1 parent e0af084 commit 46f05b5
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,9 +395,9 @@ bool Core::run_spinup()
for( NameComponentIterator it = modelComponents.begin(); it != modelComponents.end(); ++it )
spunup = spunup && ( *it ).second->run_spinup( step );
// Let visitors attempt to collect data if necessary
for( VisitorIterator visitorIt = modelVisitors.begin(); visitorIt != modelVisitors.end(); ++visitorIt ) {
if( ( *visitorIt )->shouldVisit( in_spinup, step ) ) {
accept( *visitorIt );
for( auto visitorIt : modelVisitors ) {
if( visitorIt->shouldVisit( in_spinup, step ) ) {
accept( visitorIt );
}
} // for
} // while
Expand Down Expand Up @@ -467,9 +467,9 @@ void Core::run(double runtodate) {
// component hasn't had a chance to initialize its active chemistry yet, and without that
// calc_revelle() will throw an error. Kind of hacky; but the only alternative I see is
// to create a whole new done_with_spinup() signal to the components--a lot of work.
for( VisitorIterator visitorIt = modelVisitors.begin(); visitorIt != modelVisitors.end(); ++visitorIt ) {
if( ( *visitorIt )->shouldVisit( true, lastDate ) ) {
accept( *visitorIt );
for( auto visitorIt : modelVisitors ) {
if( visitorIt->shouldVisit( true, lastDate ) ) {
accept( visitorIt );
}
}

Expand All @@ -488,9 +488,9 @@ void Core::run(double runtodate) {
}

// Let visitors attempt to collect data if necessary
for( VisitorIterator visitorIt = modelVisitors.begin(); visitorIt != modelVisitors.end(); ++visitorIt ) {
if( ( *visitorIt )->shouldVisit( in_spinup, currDate ) ) {
accept( *visitorIt );
for( auto visitorIt : modelVisitors ) {
if( visitorIt->shouldVisit( in_spinup, currDate ) ) {
accept( visitorIt );
}
}
}
Expand Down

1 comment on commit 46f05b5

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Differences in Hector outputs

Hello, this is leeyabot! 🤖

The current pull request's outputs do not differ from 3.0.0 (0f2664f).

CML watermark

Please sign in to comment.