diff options
author | Abseil Team <absl-team@google.com> | 2021-09-23 13:21:54 -0700 |
---|---|---|
committer | Andy Getz <durandal@google.com> | 2021-09-23 16:30:12 -0400 |
commit | 1ce4ceca2b2931bc4d7e470228c2dbb2f3dfea0f (patch) | |
tree | 4a01c71b72beca750a73b0cab6877f813d5d8787 /absl/container | |
parent | f3a42743db4df4c98e1df690045577c775daf20b (diff) |
Export of internal Abseil changes
--
1801102e11205861bc063e067e9fd4754b625c5a by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 398562681
--
485008445725d4013f60f4b2876f84b6b47932ec by Jorg Brown <jorg@google.com>:
Replace calls to std::isinf with comparison against max().
PiperOrigin-RevId: 398534255
--
9b99d074d39ad677cf92f99549d22bb73f504f8f by Saleem Abdulrasool <abdulras@google.com>:
debugging: add support for non-glibc targets for debugging
This relaxes the ELF mem_image handling and subsequently enables the VDSO
support for non-glibc targets. The primary need for the restriction was the
use of the `__GLIBC_PREREQ` macro. If it is undefined, assume that the glibc
pre-requisite is unavailable. This allows building the debugging_internal
target on musl targets.
PiperOrigin-RevId: 398499050
--
3cc3630ef2226ae1981a944573f0f9c27a527ebf by Abseil Team <absl-team@google.com>:
Replace usages of `auto` with proper typedefs.
PiperOrigin-RevId: 398479551
GitOrigin-RevId: 1801102e11205861bc063e067e9fd4754b625c5a
Change-Id: Ib13e8612d1b263b9c1ae7f56a9f394b24c3add2e
Diffstat (limited to 'absl/container')
-rw-r--r-- | absl/container/internal/inlined_vector.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/absl/container/internal/inlined_vector.h b/absl/container/internal/inlined_vector.h index bb365b80..e2ecf46c 100644 --- a/absl/container/internal/inlined_vector.h +++ b/absl/container/internal/inlined_vector.h @@ -98,7 +98,7 @@ template <typename A> void DestroyElements(NoTypeDeduction<A>& allocator, Pointer<A> destroy_first, SizeType<A> destroy_size) { if (destroy_first != nullptr) { - for (auto i = destroy_size; i != 0;) { + for (SizeType<A> i = destroy_size; i != 0;) { --i; AllocatorTraits<A>::destroy(allocator, destroy_first + i); } @@ -492,7 +492,7 @@ void Storage<T, N, A>::DestroyContents() { template <typename T, size_t N, typename A> void Storage<T, N, A>::InitFrom(const Storage& other) { - const auto n = other.GetSize(); + const SizeType<A> n = other.GetSize(); assert(n > 0); // Empty sources handled handled in caller. ConstPointer<A> src; Pointer<A> dst; @@ -598,9 +598,9 @@ template <typename ValueAdapter> auto Storage<T, N, A>::Resize(ValueAdapter values, SizeType<A> new_size) -> void { StorageView<A> storage_view = MakeStorageView(); - auto* const base = storage_view.data; + Pointer<A> const base = storage_view.data; const SizeType<A> size = storage_view.size; - auto& alloc = GetAllocator(); + A& alloc = GetAllocator(); if (new_size <= size) { // Destroy extra old elements. DestroyElements<A>(alloc, base + new_size, size - new_size); @@ -732,7 +732,7 @@ template <typename T, size_t N, typename A> template <typename... Args> auto Storage<T, N, A>::EmplaceBack(Args&&... args) -> Reference<A> { StorageView<A> storage_view = MakeStorageView(); - const auto n = storage_view.size; + const SizeType<A> n = storage_view.size; if (ABSL_PREDICT_TRUE(n != storage_view.capacity)) { // Fast path; new element fits. Pointer<A> last_ptr = storage_view.data + n; |