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:
authorMosesAdmin <moses-support-owner@mit.edu>2015-10-20 22:16:07 +0300
committerMosesAdmin <moses-support-owner@mit.edu>2015-10-20 22:16:07 +0300
commit9643043cb793530d0dc285eb3b355bf06e116c71 (patch)
tree1ef520414671f02cd1ae60c6ea32d2b0690b6a96 /moses/Bitmaps.cpp
parentc47f24c539456259a194412d7383c9ee5861f538 (diff)
daily automatic beautifier
Diffstat (limited to 'moses/Bitmaps.cpp')
-rw-r--r--moses/Bitmaps.cpp31
1 files changed, 15 insertions, 16 deletions
diff --git a/moses/Bitmaps.cpp b/moses/Bitmaps.cpp
index d0f4bbb7b..bb9bd20bd 100644
--- a/moses/Bitmaps.cpp
+++ b/moses/Bitmaps.cpp
@@ -8,16 +8,16 @@ namespace Moses
{
Bitmaps::Bitmaps(size_t inputSize, const std::vector<bool> &initSourceCompleted)
{
- m_initBitmap = new WordsBitmap(inputSize, initSourceCompleted);
- m_coll[m_initBitmap];
+ m_initBitmap = new WordsBitmap(inputSize, initSourceCompleted);
+ m_coll[m_initBitmap];
}
Bitmaps::~Bitmaps()
{
- BOOST_FOREACH (const Coll::value_type& myPair, m_coll) {
- const WordsBitmap *bm = myPair.first;
- delete bm;
- }
+ BOOST_FOREACH (const Coll::value_type& myPair, m_coll) {
+ const WordsBitmap *bm = myPair.first;
+ delete bm;
+ }
}
const WordsBitmap &Bitmaps::GetNextBitmap(const WordsBitmap &bm, const WordsRange &range)
@@ -30,8 +30,8 @@ const WordsBitmap &Bitmaps::GetNextBitmap(const WordsBitmap &bm, const WordsRang
m_coll[newBM] = NextBitmaps();
return *newBM;
} else {
- delete newBM;
- return *iter->first;
+ delete newBM;
+ return *iter->first;
}
}
@@ -44,14 +44,13 @@ const WordsBitmap &Bitmaps::GetBitmap(const WordsBitmap &bm, const WordsRange &r
NextBitmaps &next = iter->second;
NextBitmaps::const_iterator iterNext = next.find(range);
if (iterNext == next.end()) {
- // not seen the link yet.
- newBM = &GetNextBitmap(bm, range);
- next[range] = newBM;
- }
- else {
- // link exist
- //std::cerr << "link exists" << endl;
- newBM = iterNext->second;
+ // not seen the link yet.
+ newBM = &GetNextBitmap(bm, range);
+ next[range] = newBM;
+ } else {
+ // link exist
+ //std::cerr << "link exists" << endl;
+ newBM = iterNext->second;
}
return *newBM;
}