aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/array.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/common/array.h b/common/array.h
index 4cc5369f9f..792a5ac5b2 100644
--- a/common/array.h
+++ b/common/array.h
@@ -150,6 +150,12 @@ public:
insert_aux(_storage + idx, &element, &element + 1);
}
+ void insert_at(int idx, const Array<T> &array) {
+ assert(idx >= 0 && (uint)idx <= _size);
+ insert_aux(_storage + idx, array.begin(), array.end());
+ }
+
+
T remove_at(int idx) {
assert(idx >= 0 && (uint)idx < _size);
T tmp = _storage[idx];