From af3f72f9eb7d7b80ea827976a3303390b5deae8d Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 27 Oct 2017 15:13:50 -0600 Subject: [PATCH] Correctly mark NullPool const Saves some more code size as well! --- src/hb-open-type-private.hh | 2 +- src/hb-ot-layout.cc | 2 +- src/main.cc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index f1c90474a..a49071d29 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -133,7 +133,7 @@ static inline Type& StructAfter(TObject &X) #define HB_NULL_POOL_SIZE 264 static_assert (HB_NULL_POOL_SIZE % sizeof (void *) == 0, "Align HB_NULL_POOL_SIZE."); -extern HB_INTERNAL const void *_hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)]; +extern HB_INTERNAL const void * const _hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)]; /* Generic nul-content Null objects. */ template diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc index 4850f720d..df43c29e4 100644 --- a/src/hb-ot-layout.cc +++ b/src/hb-ot-layout.cc @@ -39,7 +39,7 @@ #include "hb-ot-map-private.hh" -const void *OT::_hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)]; +const void * const OT::_hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {}; hb_ot_layout_t * diff --git a/src/main.cc b/src/main.cc index eb1711ed6..377d1396a 100644 --- a/src/main.cc +++ b/src/main.cc @@ -38,7 +38,7 @@ using namespace OT; -const void *OT::_hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)]; +const void * const OT::_hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {}; int main (int argc, char **argv)