From 1ab3c3ed1bbc404086aefffaef4b8261bb77caa7 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 1 Jun 2018 17:34:24 -0700 Subject: [PATCH] [vector] Whitespace --- src/hb-private.hh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/hb-private.hh b/src/hb-private.hh index b46332131..e626a1418 100644 --- a/src/hb-private.hh +++ b/src/hb-private.hh @@ -683,15 +683,17 @@ struct hb_vector_t Type *new_array = nullptr; - if (arrayZ == static_array) { + if (arrayZ == static_array) + { new_array = (Type *) calloc (new_allocated, sizeof (Type)); if (new_array) memcpy (new_array, arrayZ, len * sizeof (Type)); - } else { + } + else + { bool overflows = (new_allocated < allocated) || _hb_unsigned_int_mul_overflows (new_allocated, sizeof (Type)); - if (likely (!overflows)) { + if (likely (!overflows)) new_array = (Type *) realloc (arrayZ, new_allocated * sizeof (Type)); - } } if (unlikely (!new_array))