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:
authorTetsuo Kiso <tetsuo-s@is.naist.jp>2012-04-12 04:40:52 +0400
committerTetsuo Kiso <tetsuo-s@is.naist.jp>2012-04-12 04:40:52 +0400
commit408dd72f9d137475aa14aca97290e05f6e5133c0 (patch)
tree89f1c492b63980f1b438a03b2fb1904679691c99 /mert/Point.h
parent0e9b5fd9d0b7458a938a02fd73f23b07b462a3ba (diff)
Pass by reference instead of returning objects.
In the previous implementation, copy-constructor got called, which was not necessary. This commit prevents it, making code more efficient.
Diffstat (limited to 'mert/Point.h')
-rw-r--r--mert/Point.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/mert/Point.h b/mert/Point.h
index 44070f72b..46b23c9d9 100644
--- a/mert/Point.h
+++ b/mert/Point.h
@@ -94,7 +94,7 @@ public:
* Return a vector of size m_pdim where all weights have been
* put (including fixed ones).
*/
- vector<parameter_t> GetAllWeights() const;
+ void GetAllWeights(vector<parameter_t>& w) const;
statscore_t GetScore() const { return m_score; }
void SetScore(statscore_t score) { m_score = score; }