fixed: pass by const ref

This commit is contained in:
Arne Morten Kvarving
2021-05-25 12:26:22 +02:00
parent 1285d02873
commit 078a92dd51
2 changed files with 4 additions and 4 deletions

View File

@@ -97,7 +97,7 @@ runOptimize()
// saved in "grad_map")
void
GasLiftStage2::
addOrRemoveALQincrement_(GradMap &grad_map, const std::string well_name, bool add)
addOrRemoveALQincrement_(GradMap &grad_map, const std::string& well_name, bool add)
{
// only applies to wells in the well_state_map (i.e. wells on this rank)
auto it = this->well_state_map_.find(well_name);
@@ -998,7 +998,7 @@ displayWarning_(const std::string &msg)
void
GasLiftStage2::SurplusState::
addOrRemoveALQincrement(GradMap &grad_map, const std::string well_name, bool add)
addOrRemoveALQincrement(GradMap &grad_map, const std::string& well_name, bool add)
{
if (this->parent.debug_) {
const std::string msg = fmt::format("group: {} : well {} : {} ALQ increment",

View File

@@ -78,7 +78,7 @@ class WellState;
void runOptimize();
private:
void addOrRemoveALQincrement_(
GradMap &grad_map, const std::string well_name, bool add);
GradMap &grad_map, const std::string& well_name, bool add);
std::optional<GradInfo> calcIncOrDecGrad_(
const std::string name, const GasLiftSingleWell &gs_well, bool increase);
bool checkRateAlreadyLimited_(GasLiftWellState &state, bool increase);
@@ -203,7 +203,7 @@ class WellState;
int it;
void addOrRemoveALQincrement(
GradMap &grad_map, const std::string well_name, bool add);
GradMap &grad_map, const std::string& well_name, bool add);
bool checkALQlimit();
bool checkEcoGradient(const std::string &well_name, double eco_grad);
bool checkGasTarget();