Minor, fix warnings raised when built with -std=c++2a
Follow up to c184180
,
It was raising,
src/hb-ot-layout-common.hh:1067:63: warning: implicit capture of 'this' with a capture default of '=' is deprecated [-Wdeprecated-this-capture]
| hb_filter ([=] (const OffsetTo<TSubTable> &_) { return (this+_).intersects (glyphset, lookup_type); })
^
src/hb-ot-layout-common.hh:1067:19: note: add an explicit capture of 'this' to capture '*this' by reference
| hb_filter ([=] (const OffsetTo<TSubTable> &_) { return (this+_).intersects (glyphset, lookup_type); })
^
, this
and
src/hb-ot-layout-common.hh:2626:38: warning: implicit capture of 'this' with a capture default of '=' is deprecated [-Wdeprecated-this-capture]
{ r.collect_lookups (this, lookup_indexes); })
^
src/hb-ot-layout-common.hh:2625:18: note: add an explicit capture of 'this' to capture '*this' by reference
| hb_apply ([=] (const FeatureTableSubstitutionRecord& r)
^
, this
and
src/hb-ot-hdmx-table.hh:141:44: error: implicit capture of 'this' with a capture default of '=' is deprecated [-Werror,-Wdeprecated-this-capture]
return device_record->widthsZ.as_array (get_num_glyphs ()) [_];
^
src/hb-ot-hdmx-table.hh:137:17: note: add an explicit capture of 'this' to capture '*this' by reference
| hb_map ([=] (hb_codepoint_t _)
^
, this
This commit is contained in:
parent
b4d3bf1d8a
commit
4dc3db7344
|
@ -111,7 +111,9 @@ jobs:
|
||||||
- run: LD_LIBRARY_PATH="$PWD/freetype-2.9/objs/.libs" make check || .ci/fail.sh
|
- run: LD_LIBRARY_PATH="$PWD/freetype-2.9/objs/.libs" make check || .ci/fail.sh
|
||||||
- run: make clean
|
- run: make clean
|
||||||
- run: make -Csrc CPPFLAGS="-DHB_TINY -DHB_NO_OT_FONT" libharfbuzz-subset.la && make clean
|
- run: make -Csrc CPPFLAGS="-DHB_TINY -DHB_NO_OT_FONT" libharfbuzz-subset.la && make clean
|
||||||
- run: clang -c src/hb-*.cc -DHB_NO_MT
|
- run: clang -c src/harfbuzz.cc -DHB_NO_MT
|
||||||
|
# -Werror -Werror=deprecated-this-capture can be added but it will confuse contributors so let's skip for now
|
||||||
|
- run: clang -c src/hb-*.cc -DHB_NO_MT -std=c++2a -fno-exceptions
|
||||||
|
|
||||||
gcc-valgrind:
|
gcc-valgrind:
|
||||||
docker:
|
docker:
|
||||||
|
|
|
@ -134,10 +134,10 @@ struct hdmx
|
||||||
auto row =
|
auto row =
|
||||||
+ hb_range (c->plan->num_output_glyphs ())
|
+ hb_range (c->plan->num_output_glyphs ())
|
||||||
| hb_map (c->plan->reverse_glyph_map)
|
| hb_map (c->plan->reverse_glyph_map)
|
||||||
| hb_map ([=] (hb_codepoint_t _)
|
| hb_map ([this, c, device_record] (hb_codepoint_t _)
|
||||||
{
|
{
|
||||||
if (c->plan->is_empty_glyph (_))
|
if (c->plan->is_empty_glyph (_))
|
||||||
return Null(HBUINT8);
|
return Null (HBUINT8);
|
||||||
return device_record->widthsZ.as_array (get_num_glyphs ()) [_];
|
return device_record->widthsZ.as_array (get_num_glyphs ()) [_];
|
||||||
})
|
})
|
||||||
;
|
;
|
||||||
|
|
|
@ -1064,7 +1064,7 @@ struct Lookup
|
||||||
const hb_set_t *glyphset = c->plan->glyphset ();
|
const hb_set_t *glyphset = c->plan->glyphset ();
|
||||||
unsigned int lookup_type = get_type ();
|
unsigned int lookup_type = get_type ();
|
||||||
+ hb_iter (get_subtables <TSubTable> ())
|
+ hb_iter (get_subtables <TSubTable> ())
|
||||||
| hb_filter ([=] (const OffsetTo<TSubTable> &_) { return (this+_).intersects (glyphset, lookup_type); })
|
| hb_filter ([this, glyphset, lookup_type] (const OffsetTo<TSubTable> &_) { return (this+_).intersects (glyphset, lookup_type); })
|
||||||
| hb_apply (subset_offset_array (c, out->get_subtables<TSubTable> (), this, out, lookup_type))
|
| hb_apply (subset_offset_array (c, out->get_subtables<TSubTable> (), this, out, lookup_type))
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -2622,10 +2622,8 @@ struct FeatureTableSubstitution
|
||||||
{
|
{
|
||||||
+ hb_iter (substitutions)
|
+ hb_iter (substitutions)
|
||||||
| hb_filter (feature_indexes, &FeatureTableSubstitutionRecord::featureIndex)
|
| hb_filter (feature_indexes, &FeatureTableSubstitutionRecord::featureIndex)
|
||||||
| hb_apply ([=] (const FeatureTableSubstitutionRecord& r)
|
| hb_apply ([this, lookup_indexes] (const FeatureTableSubstitutionRecord& r)
|
||||||
{
|
{ r.collect_lookups (this, lookup_indexes); })
|
||||||
r.collect_lookups (this, lookup_indexes);
|
|
||||||
})
|
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue