Ver código fonte

added extend for array list

master
Felix Brendel 5 anos atrás
pai
commit
33bac14926
1 arquivos alterados com 9 adições e 0 exclusões
  1. +9
    -0
      arraylist.hpp

+ 9
- 0
arraylist.hpp Ver arquivo

@@ -26,6 +26,15 @@ struct Array_List {
}
}


void extend(std::initializer_list<type> l) {
reserve(l.size());
for (type e : l) {
append(e);
}
}


void dealloc() {
free(data);
data = nullptr;


Carregando…
Cancelar
Salvar