[vector] Comment
This commit is contained in:
parent
69b41f92ec
commit
bef5a1c8dc
src
|
@ -95,7 +95,11 @@ struct hb_vector_t
|
||||||
void reset ()
|
void reset ()
|
||||||
{
|
{
|
||||||
if (unlikely (in_error ()))
|
if (unlikely (in_error ()))
|
||||||
allocated = length; // Big hack!
|
/* Big Hack! We don't know the true allocated size before
|
||||||
|
* an allocation failure happened. But we know it was at
|
||||||
|
* least as big as length. Restore it to that and continue
|
||||||
|
* as if error did not happen. */
|
||||||
|
allocated = length;
|
||||||
resize (0);
|
resize (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue