Add a constructor for hb_prealloced_array_t

Fixes build with MSVC.
This commit is contained in:
Behdad Esfahbod 2011-08-23 00:04:57 +02:00
parent d75333f166
commit efde811325
1 changed files with 2 additions and 0 deletions

View File

@ -240,6 +240,8 @@ struct hb_prealloced_array_t {
Type *array; Type *array;
Type static_array[StaticSize]; Type static_array[StaticSize];
hb_prealloced_array_t (void) { memset (this, 0, sizeof (*this)); }
inline Type& operator [] (unsigned int i) { return array[i]; } inline Type& operator [] (unsigned int i) { return array[i]; }
inline const Type& operator [] (unsigned int i) const { return array[i]; } inline const Type& operator [] (unsigned int i) const { return array[i]; }