diff options
author | Derek Mauro <dmauro@google.com> | 2022-09-01 10:08:26 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-09-01 10:09:08 -0700 |
commit | fa108c444f18f6345b78090af47ec5fb4a7c2c36 (patch) | |
tree | b85fec244098d41964f1d2b5709c45bbd5638a2b /absl/container/internal/inlined_vector.h | |
parent | 847fa56a5422c20a6f471e67ac0bca004ff5eac5 (diff) |
Rollback of fix "unsafe narrowing" warnings in absl, 8/n.
Addresses failures with the following, in some files:
-Wshorten-64-to-32
-Wimplicit-int-conversion
-Wsign-compare
-Wsign-conversion
-Wtautological-unsigned-zero-compare
(This specific CL focuses on .cc files in */internal/.)
Bug: chromium:1292951
PiperOrigin-RevId: 471561809
Change-Id: I7abd6d83706f5ca135f1ce3458192a498a6280b9
Diffstat (limited to 'absl/container/internal/inlined_vector.h')
-rw-r--r-- | absl/container/internal/inlined_vector.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/absl/container/internal/inlined_vector.h b/absl/container/internal/inlined_vector.h index a56b7573..fdca3061 100644 --- a/absl/container/internal/inlined_vector.h +++ b/absl/container/internal/inlined_vector.h @@ -641,8 +641,8 @@ auto Storage<T, N, A>::Insert(ConstIterator<A> pos, ValueAdapter values, SizeType<A> insert_count) -> Iterator<A> { StorageView<A> storage_view = MakeStorageView(); - auto insert_index = static_cast<SizeType<A>>( - std::distance(ConstIterator<A>(storage_view.data), pos)); + SizeType<A> insert_index = + std::distance(ConstIterator<A>(storage_view.data), pos); SizeType<A> insert_end_index = insert_index + insert_count; SizeType<A> new_size = storage_view.size + insert_count; |