diff options
author | Hieu Hoang <hieu@hoang.co.uk> | 2013-07-19 16:58:39 +0400 |
---|---|---|
committer | Hieu Hoang <hieu@hoang.co.uk> | 2013-07-19 16:58:39 +0400 |
commit | 116f1dcd41908772848ea0fee076eed28fd7566b (patch) | |
tree | dd363e2d1a5326e9f2bb15074b4eacd3f7503f38 /moses/InputPath.cpp | |
parent | d7ab163b0e521c4aced57096d3ab3800c78fc901 (diff) |
beautify
Diffstat (limited to 'moses/InputPath.cpp')
-rw-r--r-- | moses/InputPath.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/moses/InputPath.cpp b/moses/InputPath.cpp index ed49718ad..09fed6588 100644 --- a/moses/InputPath.cpp +++ b/moses/InputPath.cpp @@ -13,14 +13,14 @@ InputPath::InputPath(const Phrase &phrase, const WordsRange &range, const InputP ,m_range(range) ,m_inputScore(inputScore) { - FactorType factorType = StaticData::Instance().GetPlaceholderFactor(); - if (factorType != NOT_FOUND) { - for (size_t pos = 0; pos < m_phrase.GetSize(); ++pos) { - if (m_phrase.GetFactor(pos, factorType)) { - m_placeholders.push_back(pos); - } - } - } + FactorType factorType = StaticData::Instance().GetPlaceholderFactor(); + if (factorType != NOT_FOUND) { + for (size_t pos = 0; pos < m_phrase.GetSize(); ++pos) { + if (m_phrase.GetFactor(pos, factorType)) { + m_placeholders.push_back(pos); + } + } + } } InputPath::~InputPath() @@ -31,8 +31,8 @@ InputPath::~InputPath() // the phrase dictionary owns the target phrases so they should be doing the deleting std::vector<TargetPhraseCollection>::iterator iter; for (iter = m_copiedSet.begin(); iter != m_copiedSet.end(); ++iter) { - TargetPhraseCollection &coll = *iter; - coll.Detach(); + TargetPhraseCollection &coll = *iter; + coll.Detach(); } } @@ -57,8 +57,9 @@ const void *InputPath::GetPtNode(const PhraseDictionary &phraseDictionary) const } void InputPath::SetTargetPhrases(const PhraseDictionary &phraseDictionary - , const TargetPhraseCollection *targetPhrases - , const void *ptNode) { + , const TargetPhraseCollection *targetPhrases + , const void *ptNode) +{ std::pair<const TargetPhraseCollection*, const void*> value(targetPhrases, ptNode); m_targetPhrases[&phraseDictionary] = value; } |