From af8aafc30fe2773bcf081bc8d3844cae350d016c Mon Sep 17 00:00:00 2001 From: Marcus Holland-Moritz Date: Sat, 19 Aug 2023 23:58:49 +0200 Subject: [PATCH] Fix compilation with older GCC versions --- src/dwarfs/segmenter.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/dwarfs/segmenter.cpp b/src/dwarfs/segmenter.cpp index 2182f76f..8d7985f0 100644 --- a/src/dwarfs/segmenter.cpp +++ b/src/dwarfs/segmenter.cpp @@ -1090,13 +1090,15 @@ void segmenter_::segment_and_add_data( if constexpr (is_multi_block_mode()) { for (auto const& block : blocks_) { - block.for_each_offset_filter( - hasher(), [&](auto off) { add_match(matches, &block, off); }); + block.for_each_offset_filter(hasher(), [&, this](auto off) { + this->add_match(matches, &block, off); + }); } } else { auto& block = blocks_.front(); - block.for_each_offset( - hasher(), [&](auto off) { add_match(matches, &block, off); }); + block.for_each_offset(hasher(), [&, this](auto off) { + this->add_match(matches, &block, off); + }); } if (!matches.empty()) [[unlikely]] {