Fix C++20 compile warning on implicit capture of this with '=' default capture (...
authorAli Javadi <ali.djavadi@gmail.com>
Tue, 16 Jul 2019 17:40:24 +0000 (22:10 +0430)
committerEbrahim Byagowi <ebrahim@gnu.org>
Tue, 16 Jul 2019 17:40:24 +0000 (22:10 +0430)
commitc184180228540c23405aaa03b6b571bb41103b45
treebb668912d3be74f519c89b857fa844294ca4f57c
parent1f94388516befe137d265c261f687a47ce6f8e69
Fix C++20 compile warning on implicit capture of this with '=' default capture (#1833)

Happens when compiled with -std=c++2a, the fix just makes the captures explicit to resolve the issue. Just adding this in addition to = doesn't work in C++11.

src/hb-ot-layout-gpos-table.hh:737:18: warning: implicit capture of 'this' with a capture default of '=' is deprecated [-Wdeprecated-this-capture]
              { return (this+_).intersects (glyphs, valueFormat); })
                        ^
src/hb-ot-layout-gpos-table.hh:736:16: note: add an explicit capture of 'this' to capture '*this' by reference
    | hb_map ([=] (const OffsetTo<PairSet> &_)
               ^
                , this
src/hb-ot-layout-gpos-table.hh