mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 11:25:40 +03:00
pass by reference
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1717 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
parent
1a6dcf5e36
commit
165f7d049f
@ -44,7 +44,7 @@ public:
|
||||
inline void setIndex(size_t value){ idx=value; }
|
||||
|
||||
inline ScoreStats get(int i){ return array_.at(i); }
|
||||
void add(ScoreStats e){ array_.push_back(e); }
|
||||
void add(const ScoreStats& e){ array_.push_back(e); }
|
||||
|
||||
inline std::string name(){ return score_type; };
|
||||
inline std::string name(std::string &sctype){ return score_type = sctype; };
|
||||
|
@ -116,7 +116,7 @@ void ScoreData::loadnbest(const std::string &file)
|
||||
|
||||
|
||||
|
||||
void ScoreData::add(ScoreStats e, int sent_idx){
|
||||
void ScoreData::add(const ScoreStats& e, int sent_idx){
|
||||
if (exists(sent_idx)){
|
||||
array_.at(sent_idx).add(e);
|
||||
}
|
||||
|
@ -43,8 +43,8 @@ public:
|
||||
|
||||
inline std::string name(){ return score_type; };
|
||||
|
||||
void add(ScoreArray e){ array_.push_back(e); }
|
||||
void add(ScoreStats e, int sent_idx);
|
||||
void add(const ScoreArray& e){ array_.push_back(e); }
|
||||
void add(const ScoreStats& e, int sent_idx);
|
||||
|
||||
inline size_t size(){ return array_.size(); }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user