| 385 | } |
| 386 | |
| 387 | CoreBitVector::CoreBitVectorIterator::CoreBitVectorIterator(const CoreBitVector *cbv, bool end) |
| 388 | : cbv(cbv), bit(0) |
| 389 | { |
| 390 | wordIt = end ? cbv->words.end() : cbv->words.begin(); |
| 391 | // If user didn't request an end iterator, or words is non-empty, |
| 392 | // from 0, go to the next bit. But if the 0 bit is set, we don't |
| 393 | // need to because that is the first element. |
| 394 | if (wordIt != cbv->words.end() && !(cbv->words[0] & (Word)0b1)) ++(*this); |
| 395 | } |
| 396 | |
| 397 | const CoreBitVector::CoreBitVectorIterator &CoreBitVector::CoreBitVectorIterator::operator++(void) |
| 398 | { |