diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2014-11-28 21:29:03 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2014-11-28 21:29:03 +0300 |
commit | da8b4b74eb0dbbfe2ea6af3950a8d7144e4277d1 (patch) | |
tree | ef69ea0a203a006bacf19c4cffdea8925c250840 /moses/Parameter.h | |
parent | 79e1c12c1cc63a13ca18eba81fe975d79d5862c4 (diff) |
make GetParam() a const method with no side effect
Diffstat (limited to 'moses/Parameter.h')
-rw-r--r-- | moses/Parameter.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/moses/Parameter.h b/moses/Parameter.h index 3ebb96200..b9147bcc1 100644 --- a/moses/Parameter.h +++ b/moses/Parameter.h @@ -91,7 +91,6 @@ 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 &GetParam(const std::string ¶mName); const PARAM_VEC *GetParam2(const std::string ¶mName) const; /** check if parameter is defined (either in moses.ini or as switch) */ @@ -114,7 +113,7 @@ public: void Save(const std::string path); template<typename T> - void SetParameter(T &var, const std::string &name, const T &defaultValue) + void SetParameter(T &var, const std::string &name, const T &defaultValue) const { const PARAM_VEC *params = GetParam2(name); if (params && params->size()) { |