From 1ce4ceca2b2931bc4d7e470228c2dbb2f3dfea0f Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Thu, 23 Sep 2021 13:21:54 -0700 Subject: Export of internal Abseil changes -- 1801102e11205861bc063e067e9fd4754b625c5a by Derek Mauro : Internal change PiperOrigin-RevId: 398562681 -- 485008445725d4013f60f4b2876f84b6b47932ec by Jorg Brown : Replace calls to std::isinf with comparison against max(). PiperOrigin-RevId: 398534255 -- 9b99d074d39ad677cf92f99549d22bb73f504f8f by Saleem Abdulrasool : 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 : Replace usages of `auto` with proper typedefs. PiperOrigin-RevId: 398479551 GitOrigin-RevId: 1801102e11205861bc063e067e9fd4754b625c5a Change-Id: Ib13e8612d1b263b9c1ae7f56a9f394b24c3add2e --- absl/container/internal/inlined_vector.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'absl/container/internal') 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 void DestroyElements(NoTypeDeduction& allocator, Pointer destroy_first, SizeType destroy_size) { if (destroy_first != nullptr) { - for (auto i = destroy_size; i != 0;) { + for (SizeType i = destroy_size; i != 0;) { --i; AllocatorTraits::destroy(allocator, destroy_first + i); } @@ -492,7 +492,7 @@ void Storage::DestroyContents() { template void Storage::InitFrom(const Storage& other) { - const auto n = other.GetSize(); + const SizeType n = other.GetSize(); assert(n > 0); // Empty sources handled handled in caller. ConstPointer src; Pointer dst; @@ -598,9 +598,9 @@ template auto Storage::Resize(ValueAdapter values, SizeType new_size) -> void { StorageView storage_view = MakeStorageView(); - auto* const base = storage_view.data; + Pointer const base = storage_view.data; const SizeType size = storage_view.size; - auto& alloc = GetAllocator(); + A& alloc = GetAllocator(); if (new_size <= size) { // Destroy extra old elements. DestroyElements(alloc, base + new_size, size - new_size); @@ -732,7 +732,7 @@ template template auto Storage::EmplaceBack(Args&&... args) -> Reference { StorageView storage_view = MakeStorageView(); - const auto n = storage_view.size; + const SizeType n = storage_view.size; if (ABSL_PREDICT_TRUE(n != storage_view.capacity)) { // Fast path; new element fits. Pointer last_ptr = storage_view.data + n; -- cgit v1.2.3