diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2014-11-28 21:33:45 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2014-11-28 21:33:45 +0300 |
commit | b2c0fa097c1484db538b39d7c981c7037479a8c2 (patch) | |
tree | 2bb2aa0fc2a09c885977022675895422b86eeb74 /moses/Parameter.h | |
parent | da8b4b74eb0dbbfe2ea6af3950a8d7144e4277d1 (diff) |
make GetParam() a const method with no side effect
Diffstat (limited to 'moses/Parameter.h')
-rw-r--r-- | moses/Parameter.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/moses/Parameter.h b/moses/Parameter.h index b9147bcc1..3bbff1d53 100644 --- a/moses/Parameter.h +++ b/moses/Parameter.h @@ -91,7 +91,7 @@ public: void Explain(); /** return a vector of strings holding the whitespace-delimited values on the ini-file line corresponding to the given parameter name */ - const PARAM_VEC *GetParam2(const std::string ¶mName) const; + const PARAM_VEC *GetParam(const std::string ¶mName) const; /** check if parameter is defined (either in moses.ini or as switch) */ bool isParamSpecified(const std::string ¶mName) const { @@ -115,7 +115,7 @@ public: template<typename T> void SetParameter(T &var, const std::string &name, const T &defaultValue) const { - const PARAM_VEC *params = GetParam2(name); + const PARAM_VEC *params = GetParam(name); if (params && params->size()) { var = Scan<T>( params->at(0)); } |