platform/upstream/libHarfBuzzSharp.git
5 years ago[CFF] oss-fuzz issue 11690 ASSERT: substr.offset >= opStart (#1461)
Michiharu Ariza [Tue, 11 Dec 2018 20:21:24 +0000 (12:21 -0800)]
[CFF] oss-fuzz issue 11690 ASSERT: substr.offset >= opStart (#1461)

* fix oss-fuzz 11690: substr.offset >= opStart

detect recursive subroutine call & handle as error

* fix build failure

* add minimized test case for oss-fuzz 11690

* removed asserts

5 years agominimize use of assert: removed or changed to error handling (#1467)
Michiharu Ariza [Tue, 11 Dec 2018 20:20:20 +0000 (12:20 -0800)]
minimize use of assert: removed or changed to error handling (#1467)

5 years ago[ci] Fix Travis macOS bot ICU issue (#1472)
Ebrahim Byagowi [Tue, 11 Dec 2018 19:32:52 +0000 (23:02 +0330)]
[ci] Fix Travis macOS bot ICU issue (#1472)

5 years ago[ucdn] Fix header
👻 [Tue, 11 Dec 2018 18:38:05 +0000 (13:38 -0500)]
[ucdn] Fix header

Fixes https://github.com/harfbuzz/harfbuzz/issues/1470

5 years agoCorrect REPLACEMENT CHARACTER's code point to FFFD (#1471)
David Corbett [Tue, 11 Dec 2018 18:19:17 +0000 (13:19 -0500)]
Correct REPLACEMENT CHARACTER's code point to FFFD (#1471)

5 years ago[glyf] minor
Ebrahim Byagowi [Sat, 8 Dec 2018 10:27:39 +0000 (13:57 +0330)]
[glyf] minor

5 years ago[os2] Move typometrics detection logic to the table (#1465)
Ebrahim Byagowi [Sat, 8 Dec 2018 10:10:44 +0000 (13:40 +0330)]
[os2] Move typometrics detection logic to the table (#1465)

5 years agoApply non-controversial parts of ot-style (#1464)
Ebrahim Byagowi [Sat, 8 Dec 2018 06:50:25 +0000 (10:20 +0330)]
Apply non-controversial parts of ot-style (#1464)

Things to be used in https://github.com/harfbuzz/harfbuzz/pull/1459

5 years agofix for issue #1447 (#1462)
Michiharu Ariza [Sat, 8 Dec 2018 04:49:39 +0000 (20:49 -0800)]
fix for issue #1447 (#1462)

Added case for OpCode_BaseFontName. This opcode in spec but practically unused.
Added a comment for default case which can't be hit

5 years ago[fdsc] minor
Ebrahim Byagowi [Fri, 7 Dec 2018 19:04:12 +0000 (22:34 +0330)]
[fdsc] minor

5 years ago[CFF] Refix oss-fuzz 11714: set_blends (PR #1458) (#1460)
Michiharu Ariza [Thu, 6 Dec 2018 21:36:26 +0000 (13:36 -0800)]
[CFF] Refix oss-fuzz 11714: set_blends (PR #1458) (#1460)

* pass subarray of stack to set_blends

* get_subarray to return a value, not ref

* restored error check (with tweak)

5 years agoFix likely check
Behdad Esfahbod [Thu, 6 Dec 2018 18:27:37 +0000 (10:27 -0800)]
Fix likely check

Ouch!

5 years agoAdd default value to first argument of sub_array()
Behdad Esfahbod [Thu, 6 Dec 2018 18:26:32 +0000 (10:26 -0800)]
Add default value to first argument of sub_array()

5 years agoAdd sub_array to hb_vector_t
Behdad Esfahbod [Thu, 6 Dec 2018 18:21:06 +0000 (10:21 -0800)]
Add sub_array to hb_vector_t

5 years agoAdd default-value for second arg of sub_array()
Behdad Esfahbod [Thu, 6 Dec 2018 18:19:03 +0000 (10:19 -0800)]
Add default-value for second arg of sub_array()

5 years agoMerge pull request #1458 from harfbuzz/cff-check-blends
Ebrahim Byagowi [Thu, 6 Dec 2018 06:51:00 +0000 (10:21 +0330)]
Merge pull request #1458 from harfbuzz/cff-check-blends

[CFF] oss-fuzz issue 11714: set_blends

5 years agoadd minimized test case for oss-fuzz issue 11714
Michiharu Ariza [Thu, 6 Dec 2018 05:47:34 +0000 (21:47 -0800)]
add minimized test case for oss-fuzz issue 11714

5 years agoMerge branch 'master' into cff-check-blends
Michiharu Ariza [Thu, 6 Dec 2018 05:37:38 +0000 (21:37 -0800)]
Merge branch 'master' into cff-check-blends

5 years agocheck number of blends against args on stack
Michiharu Ariza [Thu, 6 Dec 2018 05:33:29 +0000 (21:33 -0800)]
check number of blends against args on stack

5 years agoMerge pull request #1457 from harfbuzz/cff-varstore-sanitize
Ebrahim Byagowi [Thu, 6 Dec 2018 05:03:44 +0000 (08:33 +0330)]
Merge pull request #1457 from harfbuzz/cff-varstore-sanitize

[CFF] oss-fuzz issue 11713 (CFF2VariationStore::serialize)

5 years agoMerge pull request #1456 from harfbuzz/cff-subr-sanitize
Behdad Esfahbod [Thu, 6 Dec 2018 01:37:21 +0000 (17:37 -0800)]
Merge pull request #1456 from harfbuzz/cff-subr-sanitize

[CFF] fix oss-fuzz issue 11691 (BlendArg::set_blends)

5 years agoadd minimized test case for oss-fuzz issue 11713
Michiharu Ariza [Thu, 6 Dec 2018 01:14:51 +0000 (17:14 -0800)]
add minimized test case for oss-fuzz issue 11713

5 years agosanitize variationStore in CFF2 against its size
Michiharu Ariza [Thu, 6 Dec 2018 01:04:55 +0000 (17:04 -0800)]
sanitize variationStore in CFF2 against its size

5 years agoMerge branch 'master' into cff-subr-sanitize
Michiharu Ariza [Wed, 5 Dec 2018 23:50:05 +0000 (15:50 -0800)]
Merge branch 'master' into cff-subr-sanitize

5 years agoadd minimized test case for oss-fuzz issue 11691
Michiharu Ariza [Wed, 5 Dec 2018 23:49:11 +0000 (15:49 -0800)]
add minimized test case for oss-fuzz issue 11691

5 years agoMerge pull request #1454 from harfbuzz/cff-fixbcd
Behdad Esfahbod [Wed, 5 Dec 2018 23:39:34 +0000 (15:39 -0800)]
Merge pull request #1454 from harfbuzz/cff-fixbcd

[CFF] fix oss-fuzz issue 11674: parse_bcd

5 years agoMerge pull request #1455 from harfbuzz/cff-strinc_assert
Behdad Esfahbod [Wed, 5 Dec 2018 23:37:15 +0000 (15:37 -0800)]
Merge pull request #1455 from harfbuzz/cff-strinc_assert

[CFF] fix oss-fuzz issue 11675 (ASSERT: count <= str.len)

5 years agosanitize CFF1 & CFF2 global subrs
Michiharu Ariza [Wed, 5 Dec 2018 23:07:46 +0000 (15:07 -0800)]
sanitize CFF1 & CFF2 global subrs

5 years agofix oss-fuzz issue 11675 (ASSERT: count <= str.len)
Michiharu Ariza [Wed, 5 Dec 2018 20:51:18 +0000 (12:51 -0800)]
fix oss-fuzz issue 11675 (ASSERT: count <= str.len)

Also added an additional error check to avail ()

5 years agominimized test case for oss-fuzz issue 11674
Michiharu Ariza [Wed, 5 Dec 2018 20:23:58 +0000 (12:23 -0800)]
minimized test case for oss-fuzz issue 11674

5 years agoMerge branch 'master' into cff-fixbcd
Michiharu Ariza [Wed, 5 Dec 2018 19:25:29 +0000 (11:25 -0800)]
Merge branch 'master' into cff-fixbcd

5 years agofixed a bug with fractional part in a negative value
Michiharu Ariza [Wed, 5 Dec 2018 19:18:16 +0000 (11:18 -0800)]
fixed a bug with fractional part in a negative value

5 years ago[os2] Make newer table fields accessible (#1452)
Ebrahim Byagowi [Wed, 5 Dec 2018 11:53:41 +0000 (15:23 +0330)]
[os2] Make newer table fields accessible (#1452)

5 years ago[fdsc] Implement the table parsing
Ebrahim Byagowi [Wed, 5 Dec 2018 10:47:37 +0000 (14:17 +0330)]
[fdsc] Implement the table parsing

Related to https://github.com/harfbuzz/harfbuzz/issues/1337

May used in addition to an API related to STAT.

Lots of Apple fonts have it.

5 years ago[gasp] Implement the table parsing
Ebrahim Byagowi [Wed, 5 Dec 2018 10:21:14 +0000 (13:51 +0330)]
[gasp] Implement the table parsing

May or may not be used in https://github.com/harfbuzz/harfbuzz/pull/1432

5 years agoMerge pull request #1449 from harfbuzz/cff-fixcharset
Ebrahim Byagowi [Wed, 5 Dec 2018 09:55:18 +0000 (13:25 +0330)]
Merge pull request #1449 from harfbuzz/cff-fixcharset

[CFF] fix for oss-fuzz 11657: Charset overrun

5 years agoMerge pull request #1448 from harfbuzz/cff-leak
Ebrahim Byagowi [Wed, 5 Dec 2018 09:53:23 +0000 (13:23 +0330)]
Merge pull request #1448 from harfbuzz/cff-leak

[CFF] fix leak: oss-fuzz 11662

5 years agofix unsigned long const
Michiharu Ariza [Wed, 5 Dec 2018 08:36:11 +0000 (00:36 -0800)]
fix unsigned long const

5 years agofix signed/unsigned comparison
Michiharu Ariza [Wed, 5 Dec 2018 08:26:03 +0000 (00:26 -0800)]
fix signed/unsigned comparison

5 years agouse sized int types in parse_bcd
Michiharu Ariza [Wed, 5 Dec 2018 07:58:26 +0000 (23:58 -0800)]
use sized int types in parse_bcd

5 years agorefix
Michiharu Ariza [Wed, 5 Dec 2018 07:23:23 +0000 (23:23 -0800)]
refix

5 years agofix bug
Michiharu Ariza [Wed, 5 Dec 2018 07:18:28 +0000 (23:18 -0800)]
fix bug

5 years agofix typo
Michiharu Ariza [Wed, 5 Dec 2018 06:40:07 +0000 (22:40 -0800)]
fix typo

5 years agoinclude float.h
Michiharu Ariza [Wed, 5 Dec 2018 06:30:33 +0000 (22:30 -0800)]
include float.h

5 years agocheck overflow & clamp
Michiharu Ariza [Wed, 5 Dec 2018 06:24:38 +0000 (22:24 -0800)]
check overflow & clamp

5 years ago[CFF] fix oss-fuzz issue 11670: NULL dereference (#1450)
Michiharu Ariza [Wed, 5 Dec 2018 05:32:34 +0000 (21:32 -0800)]
[CFF] fix oss-fuzz issue 11670: NULL dereference (#1450)

* guard against no subr access

* code tweak

* add minimized testcase for oss-fuzz 11670 (Null deference)

5 years agoadded minimized testcase for oss-fuzz issue 11657
Michiharu Ariza [Tue, 4 Dec 2018 22:17:03 +0000 (14:17 -0800)]
added minimized testcase for oss-fuzz issue 11657

5 years agofix oss-fuzz 11657: buffer overrun
Michiharu Ariza [Tue, 4 Dec 2018 21:51:26 +0000 (13:51 -0800)]
fix oss-fuzz 11657: buffer overrun

Check overrun in Charset1_2::get_glyph

5 years agoReuse hb_aat_layout_has_* logic in coretext-aat detection logic (#1442)
Ebrahim Byagowi [Tue, 4 Dec 2018 20:12:13 +0000 (23:42 +0330)]
Reuse hb_aat_layout_has_* logic in coretext-aat detection logic (#1442)

5 years agoMerge branch 'master' into cff-leak
Michiharu Ariza [Tue, 4 Dec 2018 19:01:26 +0000 (11:01 -0800)]
Merge branch 'master' into cff-leak

5 years agoadd unlikely to error handling
Michiharu Ariza [Tue, 4 Dec 2018 18:39:17 +0000 (10:39 -0800)]
add unlikely to error handling

5 years agoadded minimized test case for oss-fuzz issue 11662
Michiharu Ariza [Tue, 4 Dec 2018 18:30:35 +0000 (10:30 -0800)]
added minimized test case for oss-fuzz issue 11662

5 years agomore leak fixes
Michiharu Ariza [Tue, 4 Dec 2018 18:22:35 +0000 (10:22 -0800)]
more leak fixes

5 years agoMerge pull request #1444 from harfbuzz/cff-assert
Ebrahim Byagowi [Tue, 4 Dec 2018 18:00:07 +0000 (21:30 +0330)]
Merge pull request #1444 from harfbuzz/cff-assert

removed assert, fixes https://github.com/harfbuzz/harfbuzz/issues/1443

5 years agofix attempt for oss-fuzz 11662 leak
Michiharu Ariza [Tue, 4 Dec 2018 17:58:48 +0000 (09:58 -0800)]
fix attempt for oss-fuzz 11662 leak

5 years agoremoved assert
Michiharu Ariza [Tue, 4 Dec 2018 17:24:07 +0000 (09:24 -0800)]
removed assert

5 years agoMerge pull request #1441 from harfbuzz/cff-doublenum
Behdad Esfahbod [Tue, 4 Dec 2018 09:14:13 +0000 (04:14 -0500)]
Merge pull request #1441 from harfbuzz/cff-doublenum

use double as CFF Number implementation

5 years agomore double changes
Michiharu Ariza [Tue, 4 Dec 2018 00:59:41 +0000 (16:59 -0800)]
more double changes

5 years agoadded minimized test cases
Michiharu Ariza [Tue, 4 Dec 2018 00:18:10 +0000 (16:18 -0800)]
added minimized test cases

5 years agoadditional precision made a difference in extents test
Michiharu Ariza [Tue, 4 Dec 2018 00:06:58 +0000 (16:06 -0800)]
additional precision made a difference in extents test

5 years agomore double changes
Michiharu Ariza [Mon, 3 Dec 2018 23:32:42 +0000 (15:32 -0800)]
more double changes

5 years agoNumber to use double for all types
Michiharu Ariza [Mon, 3 Dec 2018 22:48:46 +0000 (14:48 -0800)]
Number to use double for all types

5 years agoMerge pull request #1439 from ebraminio/tracking
Behdad Esfahbod [Mon, 3 Dec 2018 19:30:51 +0000 (14:30 -0500)]
Merge pull request #1439 from ebraminio/tracking

[aat] Expose hb_aat_layout_has_tracking API

5 years ago[aat] Expose hb_aat_layout_has_tracking API
Ebrahim Byagowi [Mon, 3 Dec 2018 18:34:48 +0000 (22:04 +0330)]
[aat] Expose hb_aat_layout_has_tracking API

5 years ago[aat] Expose a couple APIs
Behdad Esfahbod [Mon, 3 Dec 2018 15:41:37 +0000 (10:41 -0500)]
[aat] Expose a couple APIs

New API:
+hb_aat_layout_has_substitution()
+hb_aat_layout_has_positioning()

5 years ago[aat] Fix division sign fallout
Behdad Esfahbod [Sun, 2 Dec 2018 17:38:53 +0000 (12:38 -0500)]
[aat] Fix division sign fallout

Happened after 11d2f49af8f53340134c844173f4d8655b00dea3
since now nClasses is unsigned int...

5 years agoAdd casts to hb_array_t<>
Behdad Esfahbod [Sun, 2 Dec 2018 01:04:45 +0000 (20:04 -0500)]
Add casts to hb_array_t<>

5 years agoSimplify build source list
Behdad Esfahbod [Sun, 2 Dec 2018 00:34:18 +0000 (19:34 -0500)]
Simplify build source list

5 years agoMinor
Behdad Esfahbod [Sun, 2 Dec 2018 00:28:17 +0000 (19:28 -0500)]
Minor

5 years agoNew approach to change BigEndian casts to be int-sized
Behdad Esfahbod [Sat, 1 Dec 2018 18:12:21 +0000 (13:12 -0500)]
New approach to change BigEndian casts to be int-sized

Fixes spurious warnings like:
Fixes https://github.com/harfbuzz/harfbuzz/issues/1436

5 years agoChange hb_assert_unsigned_t<> to hb_is_signed<>
Behdad Esfahbod [Sat, 1 Dec 2018 18:03:52 +0000 (13:03 -0500)]
Change hb_assert_unsigned_t<> to hb_is_signed<>

5 years agoRevert "Change BigEndian casts to be int-sized"
Behdad Esfahbod [Sat, 1 Dec 2018 05:14:48 +0000 (00:14 -0500)]
Revert "Change BigEndian casts to be int-sized"

This reverts commit eb5ddd32bf4e458ca0af8d5784f8fd46485ad225.

Broke tests, badly.  To be investigated and reenabled.

5 years agoMinor
Behdad Esfahbod [Sat, 1 Dec 2018 05:04:29 +0000 (00:04 -0500)]
Minor

5 years agoChange BigEndian casts to be int-sized
Behdad Esfahbod [Sat, 1 Dec 2018 05:03:01 +0000 (00:03 -0500)]
Change BigEndian casts to be int-sized

Fixes spurious warnings like:
Fixes https://github.com/harfbuzz/harfbuzz/issues/1436

5 years agoFix more warning
Behdad Esfahbod [Sat, 1 Dec 2018 04:38:24 +0000 (23:38 -0500)]
Fix more warning

5 years agoFix warning
Behdad Esfahbod [Sat, 1 Dec 2018 04:20:50 +0000 (23:20 -0500)]
Fix warning

5 years ago[CFF] Change spaces to tabs
Behdad Esfahbod [Sat, 1 Dec 2018 04:04:59 +0000 (23:04 -0500)]
[CFF] Change spaces to tabs

5 years ago[CFF] Whitespace
Behdad Esfahbod [Sat, 1 Dec 2018 03:54:57 +0000 (22:54 -0500)]
[CFF] Whitespace

5 years agoMinor
Behdad Esfahbod [Sat, 1 Dec 2018 03:54:20 +0000 (22:54 -0500)]
Minor

5 years agoRemove generated files that were accidentally added by CFF2 branch
Behdad Esfahbod [Sat, 1 Dec 2018 03:43:22 +0000 (22:43 -0500)]
Remove generated files that were accidentally added by CFF2 branch

5 years agoMerge pull request #1113 from harfbuzz/cff-subset
Behdad Esfahbod [Sat, 1 Dec 2018 03:40:54 +0000 (22:40 -0500)]
Merge pull request #1113 from harfbuzz/cff-subset

CFF/CFF2 subsetter

5 years agoUse nullptr instead of 0/NULL. (#1435)
Bruce Mitchener [Sat, 1 Dec 2018 03:22:49 +0000 (10:22 +0700)]
Use nullptr instead of 0/NULL. (#1435)

* Use nullptr instead of 0/NULL.

* Update test-name-table.cc

5 years agoundo 0u
Michiharu Ariza [Sat, 1 Dec 2018 02:58:14 +0000 (18:58 -0800)]
undo 0u

5 years agoMerge branch 'master' into cff-subset
Michiharu Ariza [Sat, 1 Dec 2018 02:47:34 +0000 (18:47 -0800)]
Merge branch 'master' into cff-subset

5 years agoMerge pull request #1433 from harfbuzz/overload-overload
Behdad Esfahbod [Sat, 1 Dec 2018 02:36:35 +0000 (21:36 -0500)]
Merge pull request #1433 from harfbuzz/overload-overload

Fix ambiguous overload errors with old compilers

5 years agoRevert ugly fixes
Behdad Esfahbod [Sat, 1 Dec 2018 01:45:40 +0000 (20:45 -0500)]
Revert ugly fixes

Now that we have 6daf45e0, revert cryptic hacks...

This reverts commit abd81ed4f5cbc5a94171747909bc6b77551cb929.
This reverts commit 9c6921c08c905a0cf45ba0182134e6ff910fac51.
This reverts commit d39760cabfe4007cefdfc45231e85e93fababac2.
This reverts commit fedd8e6c176dea85194693399e50243eb1c117c4.

Fixes https://github.com/harfbuzz/harfbuzz/issues/1374

5 years agoMake operator [] take signed int
Behdad Esfahbod [Sat, 1 Dec 2018 00:57:12 +0000 (19:57 -0500)]
Make operator [] take signed int

The built-in operator takes signed int.  So, match it, such that
the built-in is never a better or equally-good match to our operator.
Fixes "ambiguous overload" errors from gcc 4.2 and VS 2008.

See https://github.com/harfbuzz/harfbuzz/issues/1374

5 years agoredo fixes
Michiharu Ariza [Sat, 1 Dec 2018 00:59:41 +0000 (16:59 -0800)]
redo fixes

5 years agoyet another
Michiharu Ariza [Sat, 1 Dec 2018 00:50:46 +0000 (16:50 -0800)]
yet another

5 years agosome more
Michiharu Ariza [Sat, 1 Dec 2018 00:31:01 +0000 (16:31 -0800)]
some more

5 years agofix another pesky gcc error
Michiharu Ariza [Sat, 1 Dec 2018 00:07:08 +0000 (16:07 -0800)]
fix another pesky gcc error

5 years agosilence picky gcc errors
Michiharu Ariza [Fri, 30 Nov 2018 23:15:31 +0000 (15:15 -0800)]
silence picky gcc errors

5 years agoMerge branch 'master' into cff-subset
Michiharu Ariza [Fri, 30 Nov 2018 23:00:52 +0000 (15:00 -0800)]
Merge branch 'master' into cff-subset

5 years agoOne more.........
Behdad Esfahbod [Fri, 30 Nov 2018 21:50:30 +0000 (16:50 -0500)]
One more.........

I wonder if there's something better to do about these :(.

In file included from hb-ot-color.cc:31:
hb-ot-color-cpal-table.hh: In member function 'unsigned int OT::CPAL::get_size() const':
hb-ot-color-cpal-table.hh:118: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:

5 years agoOne more....
Behdad Esfahbod [Fri, 30 Nov 2018 21:04:52 +0000 (16:04 -0500)]
One more....

hb-ot-vorg-table.hh:96: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
hb-vector.hh:87: note: candidate 1: const Type& hb_vector_t<Type, PreallocedCount>::operator[](unsigned int) const [with Type = OT::VertOriginMetric, unsigned int PreallocedCount = 8u]
hb-ot-vorg-table.hh:96: note: candidate 2: operator[](const T*, int) <built-in>

5 years agoOne more...
Behdad Esfahbod [Fri, 30 Nov 2018 20:55:30 +0000 (15:55 -0500)]
One more...

Sigh.

hb-ot-kern-table.hh: In member function 'int OT::KernSubTableFormat3<KernSubTableHeader>::get_kerning(hb_codepoint_t, hb_codepoint_t) const':
hb-ot-kern-table.hh:59: error: ambiguous overload for 'operator[]' in 'kernValue[kernIndex[i]]'
hb-ot-kern-table.hh:59: note: candidates are: operator[](T*, int) <built-in>
hb-dsalgs.hh:574: note:                 Type& hb_array_t<Type>::operator[](unsigned int) const [with Type = const OT::IntType<short int, 2u>]

5 years agoMore...
Behdad Esfahbod [Fri, 30 Nov 2018 20:16:57 +0000 (15:16 -0500)]
More...

hb-ot-layout-gsubgpos.hh:1707: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
...

5 years agoMore weird fixes
Behdad Esfahbod [Fri, 30 Nov 2018 17:52:21 +0000 (12:52 -0500)]
More weird fixes

In file included from hb-ot-name.cc:29:
hb-ot-name-table.hh: In member function 'unsigned int OT::name::get_size() const':
hb-ot-name-table.hh:157: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
hb-open-type.hh:354: note: candidate 1: const Type& OT::UnsizedArrayOf<Type>::operator[](unsigned int) const [with Type = OT::NameRecord]
hb-ot-name-table.hh:157: note: candidate 2: operator[](const T*, int) <built-in>
hb-ot-name-table.hh: In member function 'void OT::name::accelerator_t::init(hb_face_t*)':
hb-ot-name-table.hh:196: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
hb-dsalgs.hh:574: note: candidate 1: Type& hb_array_t<Type>::operator[](unsigned int) const [with Type = const OT::NameRecord]
hb-ot-name-table.hh:196: note: candidate 2: operator[](T*, int) <built-in>
hb-ot-name-table.hh:197: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
hb-dsalgs.hh:574: note: candidate 1: Type& hb_array_t<Type>::operator[](unsigned int) const [with Type = const OT::NameRecord]
hb-ot-name-table.hh:197: note: candidate 2: operator[](T*, int) <built-in>
hb-ot-name-table.hh:198: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
hb-dsalgs.hh:574: note: candidate 1: Type& hb_array_t<Type>::operator[](unsigned int) const [with Type = const OT::NameRecord]
hb-ot-name-table.hh:198: note: candidate 2: operator[](T*, int) <built-in>
make[4]: *** [libharfbuzz_la-hb-ot-name.lo] Error 1
make[3]: *** [all-recursive] Error 1

5 years agoMerge commit 'ae79fdaa7774d3f886a8f03926577c3bd2010b03'
Behdad Esfahbod [Fri, 30 Nov 2018 16:53:30 +0000 (11:53 -0500)]
Merge commit 'ae79fdaa7774d3f886a8f03926577c3bd2010b03'

5 years agoUmm. Cryptic, yes
Behdad Esfahbod [Fri, 30 Nov 2018 16:51:26 +0000 (11:51 -0500)]
Umm.  Cryptic, yes

In file included from hb-face.cc:35:
hb-ot-cmap-table.hh: In member function 'void OT::CmapSubtableFormat4::_compiles_assertion_on_line_388() const':
hb-ot-cmap-table.hh:388: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
hb-open-type.hh:354: note: candidate 1: const Type& OT::UnsizedArrayOf<Type>::operator[](unsigned int) const [with Type = OT::IntType<short unsigned int, 2u>]
hb-ot-cmap-table.hh:388: note: candidate 2: operator[](const T*, int) <built-in>
hb-ot-cmap-table.hh: In member function 'void OT::CmapSubtableFormat4::_instance_assertion_on_line_388() const':
hb-ot-cmap-table.hh:388: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
hb-open-type.hh:354: note: candidate 1: const Type& OT::UnsizedArrayOf<Type>::operator[](unsigned int) const [with Type = OT::IntType<short unsigned int, 2u>]
hb-ot-cmap-table.hh:388: note: candidate 2: operator[](const T*, int) <built-in>
hb-face.cc: In function 'hb_blob_t* _hb_face_builder_data_reference_blob(hb_face_builder_data_t*)':
hb-face.cc:650: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
hb-vector.hh:81: note: candidate 1: Type& hb_vector_t<Type, PreallocedCount>::operator[](unsigned int) [with Type = hb_face_builder_data_t::table_entry_t, unsigned int PreallocedCount = 32u]
hb-face.cc:650: note: candidate 2: operator[](T*, int) <built-in>
hb-face.cc:650: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
hb-vector.hh:81: note: candidate 1: Type& hb_vector_t<Type, PreallocedCount>::operator[](unsigned int) [with Type = hb_face_builder_data_t::table_entry_t, unsigned int PreallocedCount = 32u]
hb-face.cc:650: note: candidate 2: operator[](const T*, int) <built-in>
hb-face.cc:651: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
hb-vector.hh:81: note: candidate 1: Type& hb_vector_t<Type, PreallocedCount>::operator[](unsigned int) [with Type = hb_face_builder_data_t::table_entry_t, unsigned int PreallocedCount = 32u]
hb-face.cc:651: note: candidate 2: operator[](T*, int) <built-in>
hb-face.cc:651: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
hb-vector.hh:81: note: candidate 1: Type& hb_vector_t<Type, PreallocedCount>::operator[](unsigned int) [with Type = hb_face_builder_data_t::table_entry_t, unsigned int PreallocedCount = 32u]
hb-face.cc:651: note: candidate 2: operator[](const T*, int) <built-in>