summaryrefslogtreecommitdiff
path: root/absl/container/fixed_array.h
diff options
context:
space:
mode:
Diffstat (limited to 'absl/container/fixed_array.h')
-rw-r--r--absl/container/fixed_array.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/absl/container/fixed_array.h b/absl/container/fixed_array.h
index 1fec9d2b..b92d9056 100644
--- a/absl/container/fixed_array.h
+++ b/absl/container/fixed_array.h
@@ -458,7 +458,7 @@ class FixedArray {
// Loop optimizes to nothing for trivially destructible T.
for (Holder* p = end(); p != begin();) (--p)->~Holder();
if (IsAllocated(size())) {
- ::operator delete[](begin());
+ std::allocator<Holder>().deallocate(p_, n_);
} else {
this->AnnotateDestruct(size());
}
@@ -470,17 +470,13 @@ class FixedArray {
private:
Holder* MakeHolder(size_type n) {
if (IsAllocated(n)) {
- return Allocate(n);
+ return std::allocator<Holder>().allocate(n);
} else {
this->AnnotateConstruct(n);
return this->data();
}
}
- Holder* Allocate(size_type n) {
- return static_cast<Holder*>(::operator new[](n * sizeof(Holder)));
- }
-
bool IsAllocated(size_type n) const { return n > inline_elements; }
const size_type n_;