Sfoglia il codice sorgente

added extend for array list

master
Felix Brendel 5 anni fa
parent
commit
33bac14926
1 ha cambiato i file con 9 aggiunte e 0 eliminazioni
  1. +9
    -0
      arraylist.hpp

+ 9
- 0
arraylist.hpp Vedi File

@@ -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;


Caricamento…
Annulla
Salva