Newer versions of MSVC with /we4146 don't like putting negative sign behind a
unsigned number as https://github.com/harfbuzz/harfbuzz/pull/2069
That however have made https://crbug.com/1050424 this complain:
src/hb-ot-color-sbix-table.hh:304:28: runtime error: negation of -2147483648 cannot be represented in type 'int';
cast to an unsigned type to negate this value to itself
which apparently can be fixed using this change.
Let's see if this won't make another ubsan complain!
The memcpy call was using the current coords count which is zero initially so no copy at all.
Sad that no test has caught it, should see why, will however with the upcoming style API tests.
If a process operation results in less pages then the current set has, it will likely corrupt the page_map since it overwrites page_map entries ahead of where it's processing. This fixes that problem by removing page_map entries that will be dropped. Then dropping orphaned pages and re-indexing retained pages.
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