summaryrefslogtreecommitdiff
path: root/compiler/utils/growable_array.h
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/utils/growable_array.h')
-rw-r--r--compiler/utils/growable_array.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/utils/growable_array.h b/compiler/utils/growable_array.h
index e703d8e25a..a1a3312576 100644
--- a/compiler/utils/growable_array.h
+++ b/compiler/utils/growable_array.h
@@ -169,6 +169,13 @@ class GrowableArray {
num_used_--;
};
+ void DeleteAt(size_t index) {
+ for (size_t i = index; i < num_used_ - 1; i++) {
+ elem_list_[i] = elem_list_[i + 1];
+ }
+ num_used_--;
+ };
+
size_t GetNumAllocated() const { return num_allocated_; }
size_t Size() const { return num_used_; }