fixed: use const refs in foreach constructs

avoids unnecessary copies
This commit is contained in:
Arne Morten Kvarving
2020-09-01 13:25:26 +02:00
parent cb067869bd
commit 182ec130b1
4 changed files with 6 additions and 6 deletions

View File

@@ -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);
}