This commit is contained in:
Hieu Hoang 2015-10-26 12:03:54 +00:00
parent 20e3827ed2
commit 692d4c3f32
3 changed files with 23 additions and 25 deletions

View File

@ -63,9 +63,9 @@ Bitmap::Bitmap(const Bitmap &copy)
}
Bitmap::Bitmap(const Bitmap &copy, const Range &range)
:m_bitmap(copy.m_bitmap)
,m_firstGap(copy.m_firstGap)
,m_numWordsCovered(copy.m_numWordsCovered)
:m_bitmap(copy.m_bitmap)
,m_firstGap(copy.m_firstGap)
,m_numWordsCovered(copy.m_numWordsCovered)
{
SetValueNonOverlap(range);
}

View File

@ -149,14 +149,12 @@ public:
bool origValue = m_bitmap[pos];
if (origValue == value) {
// do nothing
}
else {
} else {
m_bitmap[pos] = value;
UpdateFirstGap(pos, pos, value);
if (value) {
++m_numWordsCovered;
}
else {
} else {
--m_numWordsCovered;
}
}