From 546b1adcdce2d3592843938b0b81ff32e67b0b83 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 26 Jun 2014 19:10:21 -0400 Subject: [PATCH] Minor: Use template parameter default values for hb_prealloced_array_t --- src/hb-private.hh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/hb-private.hh b/src/hb-private.hh index 5179912ff..f2f580a54 100644 --- a/src/hb-private.hh +++ b/src/hb-private.hh @@ -272,7 +272,7 @@ typedef int (*hb_compare_func_t) (const void *, const void *); #define HB_PREALLOCED_ARRAY_INIT {0} -template +template struct hb_prealloced_array_t { unsigned int len; @@ -383,12 +383,11 @@ struct hb_prealloced_array_t } }; -#define HB_AUTO_ARRAY_PREALLOCED 16 template -struct hb_auto_array_t : hb_prealloced_array_t +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 (); } + hb_auto_array_t (void) { hb_prealloced_array_t::init (); } + ~hb_auto_array_t (void) { hb_prealloced_array_t::finish (); } };