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/IOWrapper.cpp | |
parent | da8b4b74eb0dbbfe2ea6af3950a8d7144e4277d1 (diff) |
make GetParam() a const method with no side effect
Diffstat (limited to 'moses/IOWrapper.cpp')
-rw-r--r-- | moses/IOWrapper.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/moses/IOWrapper.cpp b/moses/IOWrapper.cpp index 260864d40..bec21fc5a 100644 --- a/moses/IOWrapper.cpp +++ b/moses/IOWrapper.cpp @@ -212,10 +212,10 @@ IOWrapper::IOWrapper(const std::vector<FactorType> &inputFactorOrder m_singleBestOutputCollector = new Moses::OutputCollector(&std::cout); } - if (staticData.GetParameter().GetParam2("spe-src")) { - spe_src = new ifstream(staticData.GetParameter().GetParam2("spe-src")->at(0).c_str()); - spe_trg = new ifstream(staticData.GetParameter().GetParam2("spe-trg")->at(0).c_str()); - spe_aln = new ifstream(staticData.GetParameter().GetParam2("spe-aln")->at(0).c_str()); + if (staticData.GetParameter().GetParam("spe-src")) { + spe_src = new ifstream(staticData.GetParameter().GetParam("spe-src")->at(0).c_str()); + spe_trg = new ifstream(staticData.GetParameter().GetParam("spe-trg")->at(0).c_str()); + spe_aln = new ifstream(staticData.GetParameter().GetParam("spe-aln")->at(0).c_str()); } } |