Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <hieuhoang@gmail.com>2014-11-28 21:29:03 +0300
committerHieu Hoang <hieuhoang@gmail.com>2014-11-28 21:29:03 +0300
commitda8b4b74eb0dbbfe2ea6af3950a8d7144e4277d1 (patch)
treeef69ea0a203a006bacf19c4cffdea8925c250840 /moses/Parameter.h
parent79e1c12c1cc63a13ca18eba81fe975d79d5862c4 (diff)
make GetParam() a const method with no side effect
Diffstat (limited to 'moses/Parameter.h')
-rw-r--r--moses/Parameter.h3
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 &paramName);
const PARAM_VEC *GetParam2(const std::string &paramName) 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()) {