added extend for array list
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user