mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
fixed: use const refs in foreach constructs
avoids unnecessary copies
This commit is contained in:
@@ -74,7 +74,7 @@ namespace Opm
|
||||
|
||||
int all_perf = 0;
|
||||
originalConnectionIndex_.reserve(perf_data.size());
|
||||
for (const auto connection : well.getConnections()) {
|
||||
for (const auto& connection : well.getConnections()) {
|
||||
if (connection.state() == Connection::State::OPEN) {
|
||||
originalConnectionIndex_.push_back(all_perf);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user