diff --git a/contrib/other-builds/moses2/TypeDef.h b/contrib/other-builds/moses2/TypeDef.h index 3cf461772..f0bbc0a0d 100644 --- a/contrib/other-builds/moses2/TypeDef.h +++ b/contrib/other-builds/moses2/TypeDef.h @@ -9,7 +9,7 @@ #include typedef float SCORE; -const size_t NUM_FACTOR = 4; + diff --git a/contrib/other-builds/moses2/Word.cpp b/contrib/other-builds/moses2/Word.cpp index 1640c0c6e..21954c00d 100644 --- a/contrib/other-builds/moses2/Word.cpp +++ b/contrib/other-builds/moses2/Word.cpp @@ -10,7 +10,7 @@ #include "util/murmur_hash.hh" Word::Word() { - Init(m_factors, NUM_FACTOR, NULL); + Init(m_factors, MAX_NUM_FACTORS, NULL); } Word::~Word() { @@ -20,12 +20,12 @@ Word::~Word() { size_t Word::hash() const { uint64_t seed = 0; - size_t ret = util::MurmurHashNative(m_factors, sizeof(Factor*) * NUM_FACTOR, seed); + size_t ret = util::MurmurHashNative(m_factors, sizeof(Factor*) * MAX_NUM_FACTORS, seed); return ret; } bool Word::operator==(const Word &compare) const { - int cmp = memcmp(m_factors, compare.m_factors, sizeof(Factor*) * NUM_FACTOR); + int cmp = memcmp(m_factors, compare.m_factors, sizeof(Factor*) * MAX_NUM_FACTORS); return cmp == 0; } diff --git a/contrib/other-builds/moses2/Word.h b/contrib/other-builds/moses2/Word.h index 6728a0bf9..52e90c924 100644 --- a/contrib/other-builds/moses2/Word.h +++ b/contrib/other-builds/moses2/Word.h @@ -19,6 +19,6 @@ public: bool operator==(const Word &compare) const; protected: - Factor *m_factors[NUM_FACTOR]; + Factor *m_factors[MAX_NUM_FACTORS]; };