diff options
Diffstat (limited to 'compiler/utils/growable_array.h')
-rw-r--r-- | compiler/utils/growable_array.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/utils/growable_array.h b/compiler/utils/growable_array.h index 5b55b80f23..61e420c222 100644 --- a/compiler/utils/growable_array.h +++ b/compiler/utils/growable_array.h @@ -41,7 +41,7 @@ class GrowableArray { kind_(kind) { elem_list_ = static_cast<T*>(arena_->Alloc(sizeof(T) * init_length, kArenaAllocGrowableArray)); - }; + } // Expand the list size to at least new length. @@ -58,7 +58,7 @@ class GrowableArray { memcpy(new_array, elem_list_, sizeof(T) * num_allocated_); num_allocated_ = target_length; elem_list_ = new_array; - }; + } // NOTE: does not return storage, just resets use count. void Reset() { @@ -89,7 +89,7 @@ class GrowableArray { T Get(size_t index) const { DCHECK_LT(index, num_used_); return elem_list_[index]; - }; + } // Overwrite existing element at position index. List must be large enough. void Put(size_t index, T elem) { @@ -120,14 +120,14 @@ class GrowableArray { // We should either have found the element, or it was the last (unscanned) element. DCHECK(found || (element == elem_list_[num_used_ - 1])); 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_; } @@ -154,7 +154,7 @@ class GrowableArray { static void* operator new(size_t size, ArenaAllocator* arena) { return arena->Alloc(sizeof(GrowableArray<T>), kArenaAllocGrowableArray); - }; + } static void operator delete(void* p) {} // Nop. private: |