[set] Fix seam exposed by previous commit
This commit is contained in:
parent
f0de40dd61
commit
b5177d2147
|
@ -79,7 +79,7 @@ struct hb_bit_set_t
|
||||||
bool resize (unsigned int count)
|
bool resize (unsigned int count)
|
||||||
{
|
{
|
||||||
if (unlikely (count > pages.length && !successful)) return false;
|
if (unlikely (count > pages.length && !successful)) return false;
|
||||||
if (!pages.resize (count) || !page_map.resize (count))
|
if (unlikely (!pages.resize (count) || !page_map.resize (count)))
|
||||||
{
|
{
|
||||||
pages.resize (page_map.length);
|
pages.resize (page_map.length);
|
||||||
successful = false;
|
successful = false;
|
||||||
|
@ -96,7 +96,8 @@ struct hb_bit_set_t
|
||||||
|
|
||||||
void clear ()
|
void clear ()
|
||||||
{
|
{
|
||||||
if (resize (0))
|
resize (0);
|
||||||
|
if (likely (successful))
|
||||||
population = 0;
|
population = 0;
|
||||||
}
|
}
|
||||||
bool is_empty () const
|
bool is_empty () const
|
||||||
|
|
Loading…
Reference in New Issue