diff options
author | Ryan Prichard <rprichard@google.com> | 2024-01-10 21:12:13 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2024-01-10 21:12:13 +0000 |
commit | 166f7d1a92a1ce8250e821ecec3c309d082aab9a (patch) | |
tree | 4865764882776066061cb8c57817764698805f00 /base | |
parent | 9283de53031d3be5b2975ce28c58da140967ad2b (diff) | |
parent | 40c72f550868b7ff38ee867e6af4d5fd50cf1afd (diff) | |
download | libchrome-166f7d1a92a1ce8250e821ecec3c309d082aab9a.tar.gz |
Accommodate libc++ upgrade and C++20 am: 2371d51bf5 am: ec5065e27e am: 40c72f5508
Original change: https://android-review.googlesource.com/c/platform/external/libchrome/+/2903122
Change-Id: I7530d1f5b0f42eee7e85a8099d6cf706110f0bf5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'base')
-rw-r--r-- | base/containers/stack_container.h | 6 | ||||
-rw-r--r-- | base/value_iterators.cc | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/base/containers/stack_container.h b/base/containers/stack_container.h index c775744305..980da077c1 100644 --- a/base/containers/stack_container.h +++ b/base/containers/stack_container.h @@ -35,7 +35,7 @@ namespace base { template<typename T, size_t stack_capacity> class StackAllocator : public std::allocator<T> { public: - typedef typename std::allocator<T>::pointer pointer; + typedef T* pointer; typedef typename std::allocator<T>::size_type size_type; // Backing store for the allocator. The container owner is responsible for @@ -102,13 +102,13 @@ class StackAllocator : public std::allocator<T> { // Actually do the allocation. Use the stack buffer if nobody has used it yet // and the size requested fits. Otherwise, fall through to the standard // allocator. - pointer allocate(size_type n, void* hint = 0) { + pointer allocate(size_type n) { if (source_ != NULL && !source_->used_stack_buffer_ && n <= stack_capacity) { source_->used_stack_buffer_ = true; return source_->stack_buffer(); } else { - return std::allocator<T>::allocate(n, hint); + return std::allocator<T>::allocate(n); } } diff --git a/base/value_iterators.cc b/base/value_iterators.cc index ba9c73072f..4765f73fdf 100644 --- a/base/value_iterators.cc +++ b/base/value_iterators.cc @@ -4,6 +4,8 @@ #include "base/value_iterators.h" +#include "base/values.h" + namespace base { namespace detail { |