mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-24 16:31:14 +01:00
[vector] Fix warning
This commit is contained in:
1 parent
1043ddbee8
commit
54c0a17310
1 file changed
+2
-2
+2
-2
@@ -146,7 +146,7 @@ struct hb_vector_t
|
||||
if (unlikely (allocated < 0))
|
||||
return false;
|
||||
|
||||
if (likely (size <= allocated))
|
||||
if (likely (size <= (unsigned) allocated))
|
||||
return true;
|
||||
|
||||
/* Reallocate */
|
||||
@@ -158,7 +158,7 @@ struct hb_vector_t
|
||||
Type *new_array = nullptr;
|
||||
bool overflows =
|
||||
(int) new_allocated < 0 ||
|
||||
(new_allocated < allocated) ||
|
||||
(new_allocated < (unsigned) allocated) ||
|
||||
hb_unsigned_mul_overflows (new_allocated, sizeof (Type));
|
||||
if (likely (!overflows))
|
||||
new_array = (Type *) realloc (arrayZ_, new_allocated * sizeof (Type));
|
||||
|
||||
Reference in new issue
Block a user