diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2015-10-19 18:52:06 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2015-10-19 18:52:06 +0300 |
commit | 7d98df2b0c39007c9167c505b73df5ef31ffd69c (patch) | |
tree | 3a6c2745a42cea621b3021e6585df21ace0ca1a2 /moses/Bitmaps.cpp | |
parent | b700f99afb6b3e0444c592b01b798057b99327bc (diff) |
reuse bitmap key for BitmapContainer
Diffstat (limited to 'moses/Bitmaps.cpp')
-rw-r--r-- | moses/Bitmaps.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/moses/Bitmaps.cpp b/moses/Bitmaps.cpp index e130898f4..afee1fa0a 100644 --- a/moses/Bitmaps.cpp +++ b/moses/Bitmaps.cpp @@ -2,6 +2,7 @@ #include "Bitmaps.h" #include "Util.h" +using namespace std; namespace Moses { @@ -26,7 +27,7 @@ const WordsBitmap &Bitmaps::GetNextBitmap(const WordsBitmap &bm, const WordsRang Coll::const_iterator iter = m_coll.find(newBM); if (iter == m_coll.end()) { - m_coll[newBM]; + m_coll[newBM] = NextBitmaps(); return *newBM; } else { return *iter->first; @@ -48,6 +49,7 @@ const WordsBitmap &Bitmaps::GetBitmap(const WordsBitmap &bm, const WordsRange &r } else { // link exist + //std::cerr << "link exists" << endl; newBM = iterNext->second; } return *newBM; |