From c5d91f39802078fc6f6de71940739ec4d04eca07 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 9 Mar 2013 04:34:21 -0500 Subject: [PATCH] Add hb_auto_array_t --- src/hb-private.hh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/hb-private.hh b/src/hb-private.hh index 0f652ad..ff1e85d 100644 --- a/src/hb-private.hh +++ b/src/hb-private.hh @@ -376,6 +376,14 @@ struct hb_prealloced_array_t } }; +#define HB_AUTO_ARRAY_PREALLOCED 64 +template +struct hb_auto_array_t : hb_prealloced_array_t +{ + hb_auto_array_t (void) { hb_prealloced_array_t::init (); } + ~hb_auto_array_t (void) { hb_prealloced_array_t::finish (); } +}; + #define HB_LOCKABLE_SET_INIT {HB_PREALLOCED_ARRAY_INIT} template -- 2.7.4