diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2016-08-19 00:45:45 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2016-08-19 00:45:45 +0300 |
commit | 0990d92ac8a461575c6234d34417f5a8769fa1c9 (patch) | |
tree | 4497c499774d5ac6dd5785fe2324e12ad2c5b3ee /moses/Parameter.h | |
parent | 5c145f741474358eb845793b8361f4ba627b9271 (diff) |
return reference to object, not a copy
Diffstat (limited to 'moses/Parameter.h')
-rw-r--r-- | moses/Parameter.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/moses/Parameter.h b/moses/Parameter.h index c78ddfa1c..c12ff02d0 100644 --- a/moses/Parameter.h +++ b/moses/Parameter.h @@ -129,7 +129,7 @@ public: void OverwriteParam(const std::string ¶mName, PARAM_VEC values); std::vector<float> GetWeights(const std::string &name); - std::map<std::string, std::vector<float> > GetAllWeights() const { + const std::map<std::string, std::vector<float> > &GetAllWeights() const { return m_weights; } std::set<std::string> GetWeightNames() const; |