Przeglądaj źródła

added extend for array list

master
Felix Brendel 5 lat temu
rodzic
commit
33bac14926
1 zmienionych plików z 9 dodań i 0 usunięć
  1. +9
    -0
      arraylist.hpp

+ 9
- 0
arraylist.hpp Wyświetl plik

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


Ładowanie…
Anuluj
Zapisz