Fix -Wdeprecated-this-capture warning (#17882)

`this` needs to be explicitly captured to avoid the warning.

Closes #17882

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/17882 from dotnwat:patch-1 348ce1b8b2
PiperOrigin-RevId: 684433123
pull/18727/head
Noah Watkins 6 months ago committed by Copybara-Service
parent 00a6207c51
commit f8bf5eddb4
  1. 2
      src/google/protobuf/map.cc

@ -116,7 +116,7 @@ void UntypedMapBase::ClearTable(const ClearInput input) {
ABSL_DCHECK_NE(num_buckets_, kGlobalEmptyTableSize);
if (alloc_.arena() == nullptr) {
const auto loop = [=](auto destroy_node) {
const auto loop = [&, this](auto destroy_node) {
const TableEntryPtr* table = table_;
for (map_index_t b = index_of_first_non_null_, end = num_buckets_;
b < end; ++b) {

Loading…
Cancel
Save