Merge pull request #428 from akva2/pass_const_ref

fixed: pass by const ref
This commit is contained in:
Joakim Hove 2018-06-20 14:53:31 +02:00 committed by GitHub
commit 197b34d9ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)