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:
authorHieu Hoang <hieu@hoang.co.uk>2013-08-09 18:20:45 +0400
committerHieu Hoang <hieu@hoang.co.uk>2013-08-09 18:20:45 +0400
commit4db9aa2973bee8e8785ba0bb9517bbb1d66ac297 (patch)
tree368f6d77f37b6ced5012c7d22cdf86ba5b6fe3c0 /moses/ChartTranslationOptions.cpp
parentf4d534ffd7a4a0f2e5fa6c1a2455aa383fcb367e (diff)
convert to using shared pointers in ChartTranslationOptions
Diffstat (limited to 'moses/ChartTranslationOptions.cpp')
-rw-r--r--moses/ChartTranslationOptions.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/moses/ChartTranslationOptions.cpp b/moses/ChartTranslationOptions.cpp
index 44223af72..9c8b20ab3 100644
--- a/moses/ChartTranslationOptions.cpp
+++ b/moses/ChartTranslationOptions.cpp
@@ -31,11 +31,14 @@ ChartTranslationOptions::ChartTranslationOptions(const TargetPhraseCollection &t
const WordsRange &wordsRange,
float score)
: m_stackVec(stackVec)
- , m_targetPhraseCollection(&targetPhraseColl)
, m_wordsRange(&wordsRange)
, m_estimateOfBestScore(score)
{
-
+ TargetPhraseCollection::const_iterator iter;
+ for (iter = targetPhraseColl.begin(); iter != targetPhraseColl.end(); ++iter) {
+ const TargetPhrase *origTP = *iter;
+ m_targetPhraseCollection.push_back(origTP);
+ }
}
ChartTranslationOptions::~ChartTranslationOptions()