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() {
|
void dealloc() {
|
||||||
free(data);
|
free(data);
|
||||||
data = nullptr;
|
data = nullptr;
|
||||||
|
|||||||
Reference in New Issue
Block a user