Minor: Use template parameter default values for hb_prealloced_array_t

pull/27/merge
Behdad Esfahbod 11 years ago
parent 911ca38645
commit 546b1adcdc
  1. 9
      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 <typename Type, unsigned int StaticSize>
template <typename Type, unsigned int StaticSize=16>
struct hb_prealloced_array_t
{
unsigned int len;
@ -383,12 +383,11 @@ struct hb_prealloced_array_t
}
};
#define HB_AUTO_ARRAY_PREALLOCED 16
template <typename Type>
struct hb_auto_array_t : hb_prealloced_array_t <Type, HB_AUTO_ARRAY_PREALLOCED>
struct hb_auto_array_t : hb_prealloced_array_t <Type>
{
hb_auto_array_t (void) { hb_prealloced_array_t<Type, HB_AUTO_ARRAY_PREALLOCED>::init (); }
~hb_auto_array_t (void) { hb_prealloced_array_t<Type, HB_AUTO_ARRAY_PREALLOCED>::finish (); }
hb_auto_array_t (void) { hb_prealloced_array_t<Type>::init (); }
~hb_auto_array_t (void) { hb_prealloced_array_t<Type>::finish (); }
};

Loading…
Cancel
Save