From: Ali Javadi Date: Tue, 16 Jul 2019 17:40:24 +0000 (+0430) Subject: Fix C++20 compile warning on implicit capture of this with '=' default capture (... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c184180228540c23405aaa03b6b571bb41103b45;p=platform%2Fupstream%2FlibHarfBuzzSharp.git 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 &_) ^ , this --- diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh index f4be42c..5c21980 100644 --- a/src/hb-ot-layout-gpos-table.hh +++ b/src/hb-ot-layout-gpos-table.hh @@ -733,7 +733,7 @@ struct PairPosFormat1 + hb_zip (this+coverage, pairSet) | hb_filter (*glyphs, hb_first) | hb_map (hb_second) - | hb_map ([=] (const OffsetTo &_) + | hb_map ([glyphs, this] (const OffsetTo &_) { return (this+_).intersects (glyphs, valueFormat); }) | hb_any ;