diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2015-10-19 19:23:02 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2015-10-19 19:23:02 +0300 |
commit | dd7bf06f957957fad6871c33382ebf98a75ea55d (patch) | |
tree | 473c6cb6cca70f385bbb0edc9eeb380c988508bb /moses/Bitmaps.cpp | |
parent | fda97b08021238c54a440003da5d760f5f0a1349 (diff) |
Revert "share bitmaps"
This reverts commit db24036313717458c6995e087b1db1379867aab8.
Diffstat (limited to 'moses/Bitmaps.cpp')
-rw-r--r-- | moses/Bitmaps.cpp | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/moses/Bitmaps.cpp b/moses/Bitmaps.cpp index 2637cd46d..f4c78f914 100644 --- a/moses/Bitmaps.cpp +++ b/moses/Bitmaps.cpp @@ -4,12 +4,6 @@ namespace Moses { -Bitmaps::Bitmaps(size_t inputSize) -{ - m_initBitmap = new WordsBitmap(inputSize); - m_coll.insert(m_initBitmap); -} - Bitmaps::~Bitmaps() { RemoveAllInColl(m_coll); @@ -19,25 +13,10 @@ const WordsBitmap &Bitmaps::GetBitmap(const WordsBitmap &bm) { Coll::const_iterator iter = m_coll.find(&bm); if (iter == m_coll.end()) { - WordsBitmap *newBM = new WordsBitmap(bm); - m_coll.insert(newBM); - return *newBM; - } else { - return **iter; - } -} - -const WordsBitmap &Bitmaps::GetBitmap(const WordsBitmap &bm, const WordsRange &range) -{ - WordsBitmap *newBM = new WordsBitmap(bm); - newBM->SetValue(range, true); - - Coll::const_iterator iter = m_coll.find(newBM); - if (iter == m_coll.end()) { + WordsBitmap *newBM = new WordsBitmap(bm); m_coll.insert(newBM); return *newBM; } else { - delete newBM; return **iter; } } |