From 65d2d68bc5aa405e74986c3c1a7b3bcf845ee231 Mon Sep 17 00:00:00 2001 From: Hieu Hoang Date: Fri, 31 May 2013 00:00:21 +0100 Subject: [PATCH] beautify --- moses/FactorTypeSet.cpp | 10 +++++----- moses/FeatureVector.cpp | 6 +++--- moses/TranslationModel/PhraseDictionary.h | 5 +++-- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/moses/FactorTypeSet.cpp b/moses/FactorTypeSet.cpp index 44379e9f8..9ead1053a 100644 --- a/moses/FactorTypeSet.cpp +++ b/moses/FactorTypeSet.cpp @@ -36,11 +36,11 @@ FactorMask::FactorMask(const vector &factors) bool FactorMask::IsUseable(const FactorMask &other) const { for (size_t i = 0; i < other.size(); ++i) { - if (other[i]) { - if (!this->operator[](i) ) { - return false; - } - } + if (other[i]) { + if (!this->operator[](i) ) { + return false; + } + } } return true; diff --git a/moses/FeatureVector.cpp b/moses/FeatureVector.cpp index 359c22154..b495e811f 100644 --- a/moses/FeatureVector.cpp +++ b/moses/FeatureVector.cpp @@ -819,9 +819,9 @@ void FVector::merge(const FVector &other) // sparse FNVmap::const_iterator iter; for (iter = other.m_features.begin(); iter != other.m_features.end(); ++iter) { - const FName &otherKey = iter->first; - const FValue otherVal = iter->second; - m_features[otherKey] = otherVal; + const FName &otherKey = iter->first; + const FValue otherVal = iter->second; + m_features[otherKey] = otherVal; } } diff --git a/moses/TranslationModel/PhraseDictionary.h b/moses/TranslationModel/PhraseDictionary.h index ca150e584..59195f3f4 100644 --- a/moses/TranslationModel/PhraseDictionary.h +++ b/moses/TranslationModel/PhraseDictionary.h @@ -92,8 +92,9 @@ public: return m_filePath; } - const std::vector &GetFeaturesToApply() const - { return m_featuresToApply; } + const std::vector &GetFeaturesToApply() const { + return m_featuresToApply; + } protected: size_t m_tableLimit;