diff options
author | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2012-04-12 04:40:52 +0400 |
---|---|---|
committer | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2012-04-12 04:40:52 +0400 |
commit | 408dd72f9d137475aa14aca97290e05f6e5133c0 (patch) | |
tree | 89f1c492b63980f1b438a03b2fb1904679691c99 /mert/Point.h | |
parent | 0e9b5fd9d0b7458a938a02fd73f23b07b462a3ba (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.h | 2 |
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; } |