[vector] Use default constructor

This commit is contained in:
Behdad Esfahbod 2021-11-01 21:15:38 -06:00
parent 1e3f57c079
commit b6c0b40fc2
1 changed files with 4 additions and 4 deletions

View File

@ -40,7 +40,7 @@ struct hb_vector_t
typedef Type item_t;
static constexpr unsigned item_size = hb_static_size (Type);
hb_vector_t () { init (); }
hb_vector_t () = default;
hb_vector_t (std::initializer_list<Type> l) : hb_vector_t ()
{
alloc (l.size ());
@ -70,11 +70,11 @@ struct hb_vector_t
~hb_vector_t () { fini (); }
private:
int allocated; /* == -1 means allocation failed. */
int allocated = 0; /* == -1 means allocation failed. */
public:
unsigned int length;
unsigned int length = 0;
public:
Type *arrayZ;
Type *arrayZ = nullptr;
void init ()
{