diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2015-10-26 14:59:20 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2015-10-26 14:59:20 +0300 |
commit | 20e3827ed20365d96dad27c751596613da0a2370 (patch) | |
tree | 21c217e3bde16f1f0c861da1d7c073853779abf0 /moses/FF | |
parent | a811166a1acadfa3f6adef0625fb29a505ac356e (diff) |
make Bitmap constructor explicit in case we accidently create a copy during cube pruning algorithm
Diffstat (limited to 'moses/FF')
-rw-r--r-- | moses/FF/BleuScoreFeature.cpp | 2 | ||||
-rw-r--r-- | moses/FF/OSM-Feature/OpSequenceModel.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/moses/FF/BleuScoreFeature.cpp b/moses/FF/BleuScoreFeature.cpp index eaecd59af..f02230455 100644 --- a/moses/FF/BleuScoreFeature.cpp +++ b/moses/FF/BleuScoreFeature.cpp @@ -538,7 +538,7 @@ FFState* BleuScoreFeature::EvaluateWhenApplied(const Hypothesis& cur_hypo, ctx_start_idx = 0; } - Bitmap coverageVector = cur_hypo.GetWordsBitmap(); + const Bitmap &coverageVector = cur_hypo.GetWordsBitmap(); new_state->m_source_length = coverageVector.GetNumWordsCovered(); new_state->m_words = new_words.GetSubString(Range(ctx_start_idx, diff --git a/moses/FF/OSM-Feature/OpSequenceModel.cpp b/moses/FF/OSM-Feature/OpSequenceModel.cpp index db62c45bf..8153debbd 100644 --- a/moses/FF/OSM-Feature/OpSequenceModel.cpp +++ b/moses/FF/OSM-Feature/OpSequenceModel.cpp @@ -94,7 +94,7 @@ FFState* OpSequenceModel::EvaluateWhenApplied( { const TargetPhrase &target = cur_hypo.GetCurrTargetPhrase(); const Bitmap &bitmap = cur_hypo.GetWordsBitmap(); - Bitmap myBitmap = bitmap; + Bitmap myBitmap(bitmap); const Manager &manager = cur_hypo.GetManager(); const InputType &source = manager.GetSource(); // const Sentence &sourceSentence = static_cast<const Sentence&>(source); |