Initialize `Allocation` to eliminate compile error

Class `Allocation` is not initialized and I will get a compile error like this.
```
error: ‘worklist.absl::lts_20220623::InlinedVector<absl::lts_20220623::cord_internal::CordRep*, 2, std::allocator<absl::lts_20220623::cord_internal::CordRep*> >::storage_.absl::lts_20220623::inlined_vector_internal::Storage<absl::lts_20220623::cord_internal::CordRep*, 2, std::allocator<absl::lts_20220623::cord_internal::CordRep*> >::data_.absl::lts_20220623::inlined_vector_internal::Storage<absl::lts_20220623::cord_internal::CordRep*, 2, std::allocator<absl::lts_20220623::cord_internal::CordRep*> >::Data::allocated.absl::lts_20220623::inlined_vector_internal::Storage<absl::lts_20220623::cord_internal::CordRep*, 2, std::allocator<absl::lts_20220623::cord_internal::CordRep*> >::Allocated::allocated_capacity’ may be used uninitialized [-Werror=maybe-uninitialized]
```
pull/1287/head
GOGOYAO 2 years ago committed by GitHub
parent 535f22b4a0
commit 75173d8585
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      absl/container/internal/inlined_vector.h

@ -120,8 +120,8 @@ struct DestroyAdapter<A, /* IsTriviallyDestructible */ true> {
template <typename A>
struct Allocation {
Pointer<A> data;
SizeType<A> capacity;
Pointer<A> data = nullptr;
SizeType<A> capacity = 0;
};
template <typename A,

Loading…
Cancel
Save