diff options
author | Abseil Team <absl-team@google.com> | 2022-01-04 18:04:19 -0800 |
---|---|---|
committer | Andy Getz <durandal@google.com> | 2022-01-05 19:23:21 -0500 |
commit | 628a2825f8dc0219964886e7cc3f7f519e3bd950 (patch) | |
tree | eacb9c0ec6080a5647ed477a3a0749b49649efd9 /absl/container | |
parent | c498947f8cf6dd4eb7bf4d589ca0f3816fd77d36 (diff) |
Export of internal Abseil changes
--
04e8fdf6a37d31f9364ca0f70bf663ee972481c6 by Abseil Team <absl-team@google.com>:
Another implicit sign conversion found and removed.
PiperOrigin-RevId: 419718762
--
dbb6bca7d3cfa9ce79e70d0ed3d0354a4e3a0983 by Abseil Team <absl-team@google.com>:
Fix sign conversions so that absl/status/status.h can compile with -Wconversion -Wsign-compare
PiperOrigin-RevId: 419658075
GitOrigin-RevId: 04e8fdf6a37d31f9364ca0f70bf663ee972481c6
Change-Id: I18441488cc84f573c2818ee241c387e1953d5105
Diffstat (limited to 'absl/container')
-rw-r--r-- | absl/container/inlined_vector.h | 4 | ||||
-rw-r--r-- | absl/container/internal/inlined_vector.h | 4 | ||||
-rw-r--r-- | absl/container/internal/raw_hash_set.h | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/absl/container/inlined_vector.h b/absl/container/inlined_vector.h index 5597d43e..711b29c1 100644 --- a/absl/container/inlined_vector.h +++ b/absl/container/inlined_vector.h @@ -151,7 +151,7 @@ class InlinedVector { const allocator_type& allocator = allocator_type()) : storage_(allocator) { storage_.Initialize(IteratorValueAdapter<A, ForwardIterator>(first), - std::distance(first, last)); + static_cast<size_t>(std::distance(first, last))); } // Creates an inlined vector with elements constructed from the provided input @@ -522,7 +522,7 @@ class InlinedVector { EnableIfAtLeastForwardIterator<ForwardIterator> = 0> void assign(ForwardIterator first, ForwardIterator last) { storage_.Assign(IteratorValueAdapter<A, ForwardIterator>(first), - std::distance(first, last)); + static_cast<size_t>(std::distance(first, last))); } // Overload of `InlinedVector::assign(...)` to replace the contents of the diff --git a/absl/container/internal/inlined_vector.h b/absl/container/internal/inlined_vector.h index 98c26afc..cd34a413 100644 --- a/absl/container/internal/inlined_vector.h +++ b/absl/container/internal/inlined_vector.h @@ -311,10 +311,10 @@ class Storage { // Storage Constructors and Destructor // --------------------------------------------------------------------------- - Storage() : metadata_(A(), /* size and is_allocated */ 0) {} + Storage() : metadata_(A(), /* size and is_allocated */ 0u) {} explicit Storage(const A& allocator) - : metadata_(allocator, /* size and is_allocated */ 0) {} + : metadata_(allocator, /* size and is_allocated */ 0u) {} ~Storage() { if (GetSizeAndIsAllocated() == 0) { diff --git a/absl/container/internal/raw_hash_set.h b/absl/container/internal/raw_hash_set.h index ad12f41c..1157d25a 100644 --- a/absl/container/internal/raw_hash_set.h +++ b/absl/container/internal/raw_hash_set.h @@ -1953,7 +1953,7 @@ class raw_hash_set { absl::container_internal::CompressedTuple<size_t /* growth_left */, HashtablezInfoHandle, hasher, key_equal, allocator_type> - settings_{0, HashtablezInfoHandle{}, hasher{}, key_equal{}, + settings_{0u, HashtablezInfoHandle{}, hasher{}, key_equal{}, allocator_type{}}; }; |