1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-02 16:48:55 +00:00

HarfBuzz: Update to version 2.8.0

This commit is contained in:
bruvzg
2021-03-16 19:56:39 +02:00
parent 4c56fcd6cd
commit b79e8c22f0
121 changed files with 3844 additions and 3151 deletions

View File

@@ -80,7 +80,12 @@ struct hb_vector_t
fini ();
}
void reset () { resize (0); }
void reset ()
{
if (unlikely (in_error ()))
allocated = length; // Big hack!
resize (0);
}
hb_vector_t& operator = (const hb_vector_t &o)
{
@@ -181,7 +186,7 @@ struct hb_vector_t
/* Allocate for size but don't adjust length. */
bool alloc (unsigned int size)
{
if (unlikely (allocated < 0))
if (unlikely (in_error ()))
return false;
if (likely (size <= (unsigned) allocated))
@@ -195,7 +200,7 @@ struct hb_vector_t
Type *new_array = nullptr;
bool overflows =
(int) new_allocated < 0 ||
(int) in_error () ||
(new_allocated < (unsigned) allocated) ||
hb_unsigned_mul_overflows (new_allocated, sizeof (Type));
if (likely (!overflows))