Skip to content

Commit 8d8c6a9

Browse files
author
Adam Cozzette
committed
Fix warning about implicit capture of 'this' with '='
The compiler warns about this if you build with `-Wdeprecated-this-capture`. The code has been changed in such a way that this issue no longer exists in 30.0 and newer, so this fix should be merged directly to 29.x instead of being cherry-picked. Fixes #22072.
1 parent 34d73ac commit 8d8c6a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/google/protobuf/map.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ void UntypedMapBase::ClearTable(const ClearInput input) {
116116
ABSL_DCHECK_NE(num_buckets_, kGlobalEmptyTableSize);
117117

118118
if (alloc_.arena() == nullptr) {
119-
const auto loop = [=](auto destroy_node) {
119+
const auto loop = [=, this](auto destroy_node) {
120120
const TableEntryPtr* table = table_;
121121
for (map_index_t b = index_of_first_non_null_, end = num_buckets_;
122122
b < end; ++b) {

0 commit comments

Comments
 (0)