(Bitset) Fixed Find* methods not handling empty bitsets
Former-commit-id: 48b9c83c0b786fffae18d5b5fff7bbbe89056c99
This commit is contained in:
parent
2ca9989bfe
commit
70f9bb3aec
|
|
@ -480,6 +480,11 @@ unsigned int NzBitset<Block, Allocator>::FindFirstFrom(unsigned int blockIndex)
|
|||
if (m_blocks[i])
|
||||
break;
|
||||
}
|
||||
|
||||
// Est-ce qu'on a un bloc non-nul ?
|
||||
if (i == m_blocks.size()-1)
|
||||
return npos;
|
||||
|
||||
Block block = m_blocks[i];
|
||||
|
||||
// Calcul de la position du LSB dans le bloc (et ajustement de la position)
|
||||
|
|
|
|||
Loading…
Reference in New Issue