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:
-rw-r--r--moses/Bitmap.h8
-rw-r--r--moses/FF/BleuScoreFeature.cpp2
-rw-r--r--moses/FF/OSM-Feature/OpSequenceModel.cpp2
-rw-r--r--moses/SearchNormal.cpp2
4 files changed, 7 insertions, 7 deletions
diff --git a/moses/Bitmap.h b/moses/Bitmap.h
index c06120abb..08157b14d 100644
--- a/moses/Bitmap.h
+++ b/moses/Bitmap.h
@@ -96,15 +96,15 @@ private:
public:
//! Create Bitmap of length size, and initialise with vector.
- Bitmap(size_t size, const std::vector<bool>& initializer);
+ explicit Bitmap(size_t size, const std::vector<bool>& initializer);
//! Create Bitmap of length size and initialise.
- Bitmap(size_t size);
+ explicit Bitmap(size_t size);
//! Deep copy.
- Bitmap(const Bitmap &copy);
+ explicit Bitmap(const Bitmap &copy);
- Bitmap(const Bitmap &copy, const Range &range);
+ explicit Bitmap(const Bitmap &copy, const Range &range);
//! Count of words translated.
size_t GetNumWordsCovered() const {
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);
diff --git a/moses/SearchNormal.cpp b/moses/SearchNormal.cpp
index bc8be525f..62bf420fc 100644
--- a/moses/SearchNormal.cpp
+++ b/moses/SearchNormal.cpp
@@ -112,7 +112,7 @@ ProcessOneHypothesis(const Hypothesis &hypothesis)
// int maxDistortion = StaticData::Instance().GetMaxDistortion();
bool isWordLattice = m_source.GetType() == WordLatticeInput;
- const Bitmap hypoBitmap = hypothesis.GetWordsBitmap();
+ const Bitmap &hypoBitmap = hypothesis.GetWordsBitmap();
const size_t hypoFirstGapPos = hypoBitmap.GetFirstGapPos();
size_t const sourceSize = m_source.GetSize();