diff options
author | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2011-11-14 09:00:47 +0400 |
---|---|---|
committer | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2011-11-14 09:00:47 +0400 |
commit | be1506e7595bd8602a3aec3469a2407c3453d0b2 (patch) | |
tree | 24b16fa17391e57839f5d7e0ac5dcfb2f3db6dcc /mert/FeatureArray.h | |
parent | 0c7a38d9d252861e7fa7c3973a4737eb6b915279 (diff) |
Use passing objects by const references not passing by their values.
Diffstat (limited to 'mert/FeatureArray.h')
-rw-r--r-- | mert/FeatureArray.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mert/FeatureArray.h b/mert/FeatureArray.h index eaedf893a..c1c12fc47 100644 --- a/mert/FeatureArray.h +++ b/mert/FeatureArray.h @@ -47,17 +47,17 @@ public: inline std::string getIndex() const { return idx; } - inline void setIndex(const std::string & value) { - idx=value; + inline void setIndex(const std::string& value) { + idx = value; } - inline FeatureStats& get(size_t i) { + inline FeatureStats& get(size_t i) { return array_.at(i); } - inline const FeatureStats& get(size_t i)const { + inline const FeatureStats& get(size_t i)const { return array_.at(i); } - void add(FeatureStats e) { + void add(FeatureStats& e) { array_.push_back(e); } @@ -75,7 +75,7 @@ public: inline std::string Features() const { return features; } - inline void Features(const std::string f) { + inline void Features(const std::string& f) { features = f; } |