Added const keyword to getters.
The access method should be marked as const so to make the compiler aware that they should not modify the state of the object.
This commit is contained in:
@@ -215,9 +215,9 @@ public:
|
||||
const Group& group(const std::string& gname) const;
|
||||
const Well& well(const std::string& wname) const;
|
||||
|
||||
double gaslift_increment();
|
||||
double gaslift_increment() const;
|
||||
void gaslift_increment(double gaslift_increment);
|
||||
double min_eco_gradient();
|
||||
double min_eco_gradient() const;
|
||||
void min_eco_gradient(double min_eco_gradient);
|
||||
void min_wait(double min_wait);
|
||||
void all_newton(double all_newton);
|
||||
|
||||
@@ -31,7 +31,7 @@ void GasLiftOpt::gaslift_increment(double gaslift_increment) {
|
||||
this->m_increment = gaslift_increment;
|
||||
}
|
||||
|
||||
double GasLiftOpt::gaslift_increment() {
|
||||
double GasLiftOpt::gaslift_increment() const {
|
||||
return this->m_increment;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ void GasLiftOpt::min_eco_gradient(double min_eco_gradient) {
|
||||
this->m_min_eco_gradient = min_eco_gradient;
|
||||
}
|
||||
|
||||
double GasLiftOpt::min_eco_gradient() {
|
||||
double GasLiftOpt::min_eco_gradient() const {
|
||||
return this->m_min_eco_gradient;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user