Initialize TableArena::small_size_blocks_ inside constructor

This should fix some compiler errors about a missing initializer when
building with -Wmissing-field-initializers on GCC 4.8.5. I think this
must be a GCC bug, so let's just work around it.
pull/8858/head
Adam Cozzette 3 years ago
parent 0554bb24c0
commit bc67ae820b
  1. 4
      src/google/protobuf/descriptor.cc

@ -686,7 +686,7 @@ class TableArena {
T(std::forward<Args>(args)...);
}
TableArena() {}
TableArena(): small_size_blocks_() {}
TableArena(const TableArena&) = delete;
TableArena& operator=(const TableArena&) = delete;
@ -1010,7 +1010,7 @@ class TableArena {
}
Block* current_ = nullptr;
std::array<Block*, kSmallSizes.size()> small_size_blocks_ = {};
std::array<Block*, kSmallSizes.size()> small_size_blocks_;
Block* full_blocks_ = nullptr;
size_t num_allocations_ = 0;

Loading…
Cancel
Save