mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-12-01 10:34:23 +01:00
1 parent
a60ba7964e
commit
4a01eb1234
1 file changed
+8
-3
+8
-3
@@ -701,11 +701,16 @@ struct hb_prealloced_array_t
|
||||
};
|
||||
|
||||
template <typename Type>
|
||||
struct hb_auto_array_t : hb_prealloced_array_t <Type>
|
||||
struct hb_auto_t : Type
|
||||
{
|
||||
hb_auto_array_t (void) { hb_prealloced_array_t<Type>::init (); }
|
||||
~hb_auto_array_t (void) { hb_prealloced_array_t<Type>::fini (); }
|
||||
hb_auto_t (void) { Type::init (); }
|
||||
~hb_auto_t (void) { Type::fini (); }
|
||||
private: /* Hide */
|
||||
void init (void) {}
|
||||
void fini (void) {}
|
||||
};
|
||||
template <typename Type>
|
||||
struct hb_auto_array_t : hb_auto_t <hb_prealloced_array_t <Type> > {};
|
||||
|
||||
|
||||
#define HB_LOCKABLE_SET_INIT {HB_PREALLOCED_ARRAY_INIT}
|
||||
|
||||
Reference in new issue
Block a user