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>2011-11-12 06:26:13 +0400
committerTetsuo Kiso <tetsuo-s@is.naist.jp>2011-11-12 06:26:13 +0400
commitfb3b0f9f62259a6e23b8a2e94484957e38dce335 (patch)
tree20adf195427ded1e05e26b831c8615c491eff948 /mert/FeatureArray.cpp
parent54b3b846c7591c8e4b8443740e5f611297959ed7 (diff)
Add const to Data and Feature class members.
Diffstat (limited to 'mert/FeatureArray.cpp')
-rw-r--r--mert/FeatureArray.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/mert/FeatureArray.cpp b/mert/FeatureArray.cpp
index a06434a5a..f52705aa1 100644
--- a/mert/FeatureArray.cpp
+++ b/mert/FeatureArray.cpp
@@ -135,19 +135,16 @@ void FeatureArray::merge(FeatureArray& e)
add(e.get(i));
}
-
-
-bool FeatureArray::check_consistency()
+bool FeatureArray::check_consistency() const
{
- size_t sz = NumberOfFeatures();
-
+ const size_t sz = NumberOfFeatures();
if (sz == 0)
return true;
- for (featarray_t::iterator i=array_.begin(); i!=array_.end(); i++)
- if (i->size()!=sz)
+ for (featarray_t::const_iterator i = array_.begin(); i != array_.end(); i++) {
+ if (i->size() != sz)
return false;
-
+ }
return true;
}