fixed: pass by const ref

This commit is contained in:
Arne Morten Kvarving
2018-06-20 12:55:27 +02:00
parent d1d9e214ce
commit 261f6ac270
2 changed files with 2 additions and 2 deletions

View File

@@ -96,7 +96,7 @@ public:
*/
void dropCompletion(const std::string& well_name, size_t completionIdx);
bool hasWell(const std::string well_name, WellTestConfig::Reason reason) const;
bool hasWell(const std::string& well_name, WellTestConfig::Reason reason) const;
void openWell(const std::string& well_name);
bool hasCompletion(const std::string well_name, const size_t completionIdx) const;

View File

@@ -48,7 +48,7 @@ namespace Opm {
}
bool WellTestState::hasWell(const std::string well_name, WellTestConfig::Reason reason) const {
bool WellTestState::hasWell(const std::string& well_name, WellTestConfig::Reason reason) const {
const auto well_iter = std::find_if(wells.begin(),
wells.end(),
[&well_name, &reason](const ClosedWell& well)