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:33:45 +0300
committerHieu Hoang <hieuhoang@gmail.com>2014-11-28 21:33:45 +0300
commitb2c0fa097c1484db538b39d7c981c7037479a8c2 (patch)
tree2bb2aa0fc2a09c885977022675895422b86eeb74 /moses/Parameter.h
parentda8b4b74eb0dbbfe2ea6af3950a8d7144e4277d1 (diff)
make GetParam() a const method with no side effect
Diffstat (limited to 'moses/Parameter.h')
-rw-r--r--moses/Parameter.h4
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 &paramName) const;
+ const PARAM_VEC *GetParam(const std::string &paramName) const;
/** check if parameter is defined (either in moses.ini or as switch) */
bool isParamSpecified(const std::string &paramName) 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));
}