From f9cfa5cb0e70203279e74fb6adb0cd4570238ff8 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 6 Aug 2018 05:29:15 -0700 Subject: [PATCH] Change null-pool specialization to min_size again --- src/hb-null.hh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hb-null.hh b/src/hb-null.hh index ca7492ebe..5ab3289eb 100644 --- a/src/hb-null.hh +++ b/src/hb-null.hh @@ -49,19 +49,19 @@ static inline Type const & Null (void) { } #define Null(Type) Null() -/* Specializaiton for arbitrary-content arbitrary-sized Null objects. */ +/* Specializaitons for arbitrary-content Null objects expressed in bytes. */ #define DECLARE_NULL_NAMESPACE_BYTES(Namespace, Type) \ } /* Close namespace. */ \ -extern HB_INTERNAL const unsigned char _hb_Null_##Namespace##_##Type[sizeof (Namespace::Type)]; \ +extern HB_INTERNAL const unsigned char _hb_Null_##Namespace##_##Type[Namespace::Type::min_size]; \ template <> \ /*static*/ inline const Namespace::Type& Null (void) { \ return *reinterpret_cast (_hb_Null_##Namespace##_##Type); \ } \ namespace Namespace { \ -static_assert (Namespace::Type::min_size <= sizeof (Type), "Null pool too small. Enlarge."); \ +static_assert (true, "Just so we take semicolon after.") #define DEFINE_NULL_NAMESPACE_BYTES(Namespace, Type) \ -const unsigned char _hb_Null_##Namespace##_##Type[sizeof (Namespace::Type)] +const unsigned char _hb_Null_##Namespace##_##Type[Namespace::Type::min_size] /* Global writable pool. Enlarge as necessary. */