Garret Rieger
4af3be6ef8
Remove glyph array from subset plan, make num_glyphs and glyphset private.
2019-01-29 13:19:21 -08:00
Garret Rieger
23f364429d
[subset] Fix hdmx subsetting when retain gids is enabled.
2019-01-29 13:19:21 -08:00
Garret Rieger
2da1654aef
[subset] Compute num_glyphs during subset plan construction.
...
Update maxp to use the correct num glyphs.
2019-01-29 13:19:21 -08:00
Garret Rieger
96b038f375
[subset] fix failure to init instruction ranges values for an invalid glyph.
2019-01-29 13:19:21 -08:00
Garret Rieger
4b1ac3a2fa
[subset] Do some refactoring in hb-subset-glyf.cc.
...
- Extract code out into helper methods in several places.
- Bundle loca address, size and is short into a struct.
2019-01-29 13:19:21 -08:00
Garret Rieger
b7f971884e
Add retain_gids option to subset input. Update glyf and loca handling to respect retain_gids.
2019-01-29 13:19:21 -08:00
Michiharu Ariza
b379900755
Merge branch 'master' into cff-more-arrayof-fixes
2019-01-29 12:19:57 -08:00
Behdad Esfahbod
9a1df82e3f
[uniscribe] Whitelist function type cast
2019-01-28 14:15:18 -05:00
Behdad Esfahbod
6e1c3eaf70
Fix sign comparison error
2019-01-28 14:12:41 -05:00
Behdad Esfahbod
9db7a7da63
Fix warning
...
c:\projects\harfbuzz\src\hb-ot-color-cbdt-table.hh(59): warning C4146: unary minus operator applied to unsigned type, result still unsigned [C:\projects\harfbuzz\build\harfbuzz.vcxproj]
2019-01-28 14:09:59 -05:00
Behdad Esfahbod
51b584880e
[pragma] Silence MSVC unknown-pragma warning
2019-01-28 14:09:45 -05:00
Behdad Esfahbod
60022ecced
Fix -Wcast-function-type warnings in util/ with gcc 4.8
2019-01-26 14:04:51 +01:00
Behdad Esfahbod
f398097529
More static constexpr
2019-01-25 16:08:25 +01:00
Michiharu Ariza
c685644386
Merge branch 'master' into cff-more-arrayof-fixes
2019-01-24 13:19:18 -08:00
Behdad Esfahbod
e970de48bc
[AAT] Minor sign
2019-01-24 18:16:17 +01:00
Behdad Esfahbod
a371a28cda
[AAT] Use a ring buffer for ligature stack
...
I think Apple does very similarly, but probably with a stack size of 16.
We do it with a stack size that is currently set to 64.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1531
2019-01-24 18:12:25 +01:00
Behdad Esfahbod
7886b1578f
Whitespace
2019-01-24 18:06:17 +01:00
Behdad Esfahbod
b976940243
[AAT] Handle transition errors during machine operation
...
Before we used to give up. Now, just ignore error and continue processing.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1531
2019-01-24 18:01:07 +01:00
Michiharu Ariza
0bd0a3311c
Merge branch 'master' into cff-more-arrayof-fixes
2019-01-24 08:53:28 -08:00
Behdad Esfahbod
e234bb6a42
[AAT] Ignore machine errors and continue
2019-01-24 17:23:11 +01:00
Behdad Esfahbod
1ec90514f6
[AAT] Minor
2019-01-24 17:21:41 +01:00
Behdad Esfahbod
299eca0c3b
[AAT] Handle out-of-bounds classes
2019-01-24 17:17:00 +01:00
Behdad Esfahbod
c4623db4a3
[AAT] Minor
2019-01-24 17:10:12 +01:00
Behdad Esfahbod
c4e36f97b6
[AAT] Minor
2019-01-24 17:06:16 +01:00
Behdad Esfahbod
f60282c5bf
More pragma control
...
Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=924848
2019-01-24 16:29:09 +01:00
Behdad Esfahbod
fd0889f903
Comment
2019-01-24 16:12:52 +01:00
Behdad Esfahbod
9f31417733
Form cluster for Emoji sub-region tag sequences
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1556
2019-01-24 16:08:33 +01:00
Behdad Esfahbod
3ecda71041
Adjust mark offsets when zeroing from fallback mark positioning code
...
Adjust tests.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1532
2019-01-24 12:28:24 +01:00
Michiharu Ariza
12cd3171ba
Merge branch 'master' into cff-more-arrayof-fixes
2019-01-23 14:05:42 -08:00
Michiharu Ariza
261a742181
more rewriting with ArrayOf<>
...
CFF1 Encoding0, Encoding1, CFF1SuppEncData
2019-01-23 14:04:29 -08:00
Behdad Esfahbod
36fb2b4da9
[AAT] In InsertionChain, set mark to previous-position if inserting
...
Fixes MORX-31
2019-01-23 20:53:57 +01:00
Behdad Esfahbod
baf4d6a68a
[AAT] Remove mark_set from InsertionChain
2019-01-23 20:36:07 +01:00
Behdad Esfahbod
0b2fa342de
More of previous
2019-01-22 16:36:00 +01:00
Behdad Esfahbod
a5e5dd8b42
Fix sign-compare error resulted from promoting unsigned integers to signed larger ints
...
Clang and gcc know not to warn in these cases, but not nonmainstream compilers
2019-01-22 16:30:07 +01:00
Behdad Esfahbod
32379bbf10
Cast HB_UNTAG results to uint8_t
2019-01-22 12:55:29 +01:00
Behdad Esfahbod
83d4aa5ca9
More -Wcast-error fix
2019-01-22 12:52:23 +01:00
Behdad Esfahbod
447323b85a
Better fix for -Wcast-align errors
2019-01-22 12:50:12 +01:00
Behdad Esfahbod
81ec543d80
More -Wcast-error fixes
2019-01-22 12:43:12 +01:00
Behdad Esfahbod
9077272549
pragma GCC diagnostic error "-Wsign-compare"
2019-01-22 12:40:18 +01:00
Behdad Esfahbod
8d05bf7dc0
Fix cast-align error
...
If compiler doesn't inline StructAtOffset, this was an error since we
only disable cast-align at call-site. So, move the cast out.
../src/hb-machinery.hh: In instantiation of 'const Type& StructAtOffset(const void*, unsigned int) [with Type = unsigned int]':
../src/hb-font.cc:146:85: required from here
../src/hb-machinery.hh:63:12: error: cast from 'const char*' to 'const unsigned int*' increases required alignment of target type [-Werror=cast-align]
{ return * reinterpret_cast<const Type*> ((const char *) P + offset); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/hb-machinery.hh: In instantiation of 'Type& StructAtOffset(void*, unsigned int) [with Type = unsigned int]':
../src/hb-font.cc:147:79: required from here
../src/hb-machinery.hh:66:12: error: cast from 'char*' to 'unsigned int*' increases required alignment of target type [-Werror=cast-align]
{ return * reinterpret_cast<Type*> ((char *) P + offset); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2019-01-22 12:34:05 +01:00
Behdad Esfahbod
70a52d6bd8
Convert all other enum class consts to static constexpr
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1553
2019-01-22 12:17:26 +01:00
Behdad Esfahbod
5d4b0377b9
Convert unsigned enum class consts to static constexpr
...
Part of https://github.com/harfbuzz/harfbuzz/issues/1553
2019-01-22 12:17:26 +01:00
Behdad Esfahbod
ef00654962
Convert tag enum class consts to static constexpr
...
Part of https://github.com/harfbuzz/harfbuzz/issues/1553
2019-01-22 12:17:26 +01:00
Behdad Esfahbod
39e1b6d03f
Convert boolean enum class consts to static constexpr
...
Part of https://github.com/harfbuzz/harfbuzz/issues/1553
2019-01-22 12:17:26 +01:00
Behdad Esfahbod
271cb7c1c0
Make some enum constants unsigned
2019-01-22 12:17:26 +01:00
Behdad Esfahbod
3d9a6e6266
Whitespace
2019-01-22 12:17:26 +01:00
Behdad Esfahbod
c81f02fd06
pragma GCC diagnostic error "-Wvla"
2019-01-22 12:17:26 +01:00
Behdad Esfahbod
380c3cffb9
Use enum for class constant
2019-01-22 10:51:20 +01:00
Behdad Esfahbod
6d042a18e7
[CFF] Use enum for tableTag
2019-01-22 10:51:20 +01:00
Behdad Esfahbod
c1cbbb9459
Use static constexpr for large class constants
2019-01-22 10:51:20 +01:00
Behdad Esfahbod
043b610fa6
Fix sign compare warnings
...
../../third_party/harfbuzz-ng/src/src/hb-map.hh(56,45): warning: comparison of integers of different signs: 'const hb_codepoint_t' (aka 'const unsigned int') and 'hb_map_t::(anonymous enum at ../../third_party/harfbuzz-ng/src/src/hb-map.hh:169:3)' [-Wsign-compare]
bool is_unused () const { return key == INVALID; }
2019-01-19 09:21:33 -05:00
Behdad Esfahbod
ce317d0320
Fix warning
...
warning: '_WIN64' is not defined, evaluates to 0 [-Wundef]
2019-01-19 09:21:33 -05:00
Ebrahim Byagowi
0c2bd1b160
[dwrite] Fix delete-non-virtual-dtor warning ( #1550 )
2019-01-19 16:30:07 +03:30
Behdad Esfahbod
89bcfb204c
Remove TRACE_COLLECT_GLYPHS
2019-01-18 14:59:18 -05:00
Behdad Esfahbod
f13b6786f0
[pragma] Only add if GCC or clang
2019-01-18 14:53:54 -05:00
Behdad Esfahbod
c2ea7a9da4
[directwrite] More fix
2019-01-18 14:20:45 -05:00
Ebrahim Byagowi
9714d3ec5c
[dwrite] Try to fix delete-non-virtual-dtor warnings
...
Fixes #1548 hopefully
2019-01-18 21:55:21 +03:30
Behdad Esfahbod
0772c06f96
Remove tracing from closure
2019-01-18 12:53:47 -05:00
Behdad Esfahbod
d9f6be3a61
Fix -Wundef errors with __GNUC__
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1549
2019-01-18 12:53:47 -05:00
Michiharu Ariza
28917e58f9
init interp_env_t::hintmask_size
...
fixes issue #1547
2019-01-18 09:43:51 -08:00
Behdad Esfahbod
9b4e51b2e4
[pragma] Enable error -Wdelete-non-virtual-dtor
...
Currently fails directwrite backend.
2019-01-18 12:23:02 -05:00
Behdad Esfahbod
e65272281c
[directwrite] Fix error
...
hb-directwrite.cc: In constructor 'TextAnalysis::TextAnalysis(const wchar_t*, uint32_t, const wchar_t*, DWRITE_READING_DIRECTION)':
hb-directwrite.cc:489:18: error: 'TextAnalysis::mText' will be initialized after [-Werror=reorder]
const wchar_t* mText;
^~~~~
hb-directwrite.cc:488:12: error: 'uint32_t TextAnalysis::mTextLength' [-Werror=reorder]
uint32_t mTextLength;
^~~~~~~~~~~
hb-directwrite.cc:282:3: error: when initialized here [-Werror=reorder]
TextAnalysis (const wchar_t* text, uint32_t textLength,
^~~~~~~~~~~~
hb-directwrite.cc: In function 'hb_bool_t _hb_directwrite_shape_full(hb_shape_plan_t*, hb_font_t*, hb_buffer_t*, const hb_feature_t*, unsigned int, float)':
2019-01-18 12:22:07 -05:00
Behdad Esfahbod
b900f78088
[pragma] More cast-align whitelist
2019-01-18 10:08:23 -05:00
Behdad Esfahbod
0d8b931bbe
[pragma] Allow cast-align in hb-font.cc
...
../src/hb-machinery.hh: In instantiation of 'const Type& StructAtOffset(const void*, unsigned int) [with Type = unsigned int]':
../src/hb-font.cc:144:85: required from here
../src/hb-machinery.hh:63:12: error: cast from 'const char*' to 'const unsigned int*' increases required alignment of target type [-Werror=cast-align]
{ return * reinterpret_cast<const Type*> ((const char *) P + offset); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/hb-machinery.hh: In instantiation of 'Type& StructAtOffset(void*, unsigned int) [with Type = unsigned int]':
../src/hb-font.cc:145:79: required from here
../src/hb-machinery.hh:66:12: error: cast from 'char*' to 'unsigned int*' increases required alignment of target type [-Werror=cast-align]
{ return * reinterpret_cast<Type*> ((char *) P + offset); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/hb-machinery.hh: In instantiation of 'Type& StructAtOffset(void*, unsigned int) [with Type = int]':
2019-01-18 10:03:43 -05:00
Behdad Esfahbod
a25174a56b
[pragma] GCC diagnostic error "-Wreorder"
2019-01-18 09:59:36 -05:00
Behdad Esfahbod
4660090569
[pragma] GCC diagnostic warning "-Wmaybe-uninitialized"
2019-01-18 09:53:16 -05:00
Behdad Esfahbod
7a634d7d5b
[pragma] Massage more
2019-01-18 09:49:14 -05:00
Behdad Esfahbod
16e5ba85b1
[pragma] More
2019-01-18 09:46:17 -05:00
Behdad Esfahbod
2bd530d598
[pragma] Reorg again
...
https://github.com/harfbuzz/harfbuzz/issues/1546
2019-01-18 09:28:22 -05:00
Behdad Esfahbod
c04272fac8
[pragma] GCC diagnostic ignored "-Wunknown-warning-option"
...
Try at fixing https://github.com/harfbuzz/harfbuzz/issues/1546
2019-01-18 08:49:45 -05:00
Behdad Esfahbod
4d3c8f9685
[uniscribe] More warnings
2019-01-17 19:58:54 -05:00
Behdad Esfahbod
6a5d2b21d8
[uniscribe] Fix warnings
2019-01-17 19:57:17 -05:00
Behdad Esfahbod
5b13e458c3
Fix build
2019-01-17 19:52:32 -05:00
Behdad Esfahbod
a77bd6bb89
[pragma] GCC diagnostic ignored "-Wclass-memaccess"
2019-01-17 19:33:41 -05:00
Behdad Esfahbod
436c7b294a
[pragma] ignored -Wunsafe-loop-optimizations // TODO fix
2019-01-17 19:03:33 -05:00
Behdad Esfahbod
e3b3181e9d
[pragma] error -Wclass-memaccess
2019-01-17 19:02:06 -05:00
Behdad Esfahbod
1a6b97a491
[pragma] More
2019-01-17 18:55:03 -05:00
Behdad Esfahbod
06e8091661
[pragma] More
2019-01-17 18:47:32 -05:00
Behdad Esfahbod
1077e40bf1
[pragma] Flesh out more
2019-01-17 18:36:10 -05:00
Behdad Esfahbod
7e6bd510fc
Use NNOffsetTo<> in rest of places
2019-01-17 18:24:18 -05:00
Behdad Esfahbod
b1152d5e66
Use NNOffsetTo<>
2019-01-17 18:17:04 -05:00
Behdad Esfahbod
205d72a198
Add NNOffsetTo<>
2019-01-17 18:10:38 -05:00
Behdad Esfahbod
c99d13d860
[AAT] Comment
2019-01-17 17:56:27 -05:00
Behdad Esfahbod
f39b5603ff
Comment
2019-01-17 17:50:01 -05:00
Behdad Esfahbod
347ad454b8
[AAT] Remove unused code
2019-01-17 17:47:29 -05:00
Behdad Esfahbod
b344d4385a
[AAT] Allow null in ankr lookupTable offset
2019-01-17 17:44:39 -05:00
Behdad Esfahbod
14a560a245
[pragma GCC] Ignore -Wtype-limits
2019-01-17 17:42:44 -05:00
Behdad Esfahbod
3f2daae630
More GCC pragmas
2019-01-17 15:27:31 -05:00
Behdad Esfahbod
d6c5473e1f
Rename macro
2019-01-17 15:22:46 -05:00
Behdad Esfahbod
a9946b7cfe
Add more GCC warning pragmas
2019-01-17 15:22:28 -05:00
Behdad Esfahbod
868b0c0c2e
Move -Wcast-align to hb.hh
2019-01-17 15:18:18 -05:00
Behdad Esfahbod
8874eef8ff
Add pragram GCC diagnostic ignored "-Wunused-macros"
2019-01-17 15:04:44 -05:00
Behdad Esfahbod
cc8e9a436f
[AAT] Fully sanitize ankr table at sanitize time
...
Third try to fix access. Followup 6879efc2c1
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12532
Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=922303
2019-01-17 14:55:05 -05:00
Behdad Esfahbod
6879efc2c1
[AAT] Fix anchor bound checking, again
...
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12532
Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=922303
2019-01-17 14:08:02 -05:00
Behdad Esfahbod
a262eb3d0b
[aat] Minor
2019-01-17 14:06:32 -05:00
Behdad Esfahbod
c986ca15a6
Improve overflow avoidance
...
Better fix for 480406cd3e
This way we behave the same on 32bit and 64bit archs.
2019-01-15 13:58:19 -05:00
Behdad Esfahbod
0d2727f4fe
fix FDSelect fuzzing bug ( #1539 )
...
Rewrote struct FDSelect3_4.ranges as ArrayOf
Updated FDSelect3_4::sanitize () to call ranges.sanitize ()
nRanges now a function to return a reference to ranges.len
2019-01-14 18:23:17 -08:00
Behdad Esfahbod
9f6172d669
Move _POSIX_SOURCE definition
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1308
2019-01-14 20:45:31 -05:00
Behdad Esfahbod
480406cd3e
Fix assertion on address overflow
...
Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=917031
2019-01-14 15:27:34 -05:00
Behdad Esfahbod
7a6686a589
[AAT] Fix mort ContextualSubtable offset access
...
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12312
2019-01-14 15:09:14 -05:00
Behdad Esfahbod
a3fa7d3336
[AAT] Fix ankr table access
...
Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=918340
2019-01-14 14:37:36 -05:00
Michiharu Ariza
760303d411
deleted a duplicate fontdicts_mod.fini() call ( #1538 )
2019-01-11 15:27:35 -08:00
Michiharu Ariza
7b48641aa8
fix leak in subset_enc_supp_codes ( #1537 )
...
oss-fuzz issue 12310
2019-01-08 15:37:48 -05:00
Ebrahim Byagowi
97f67a3c3d
[ci] Enable more of GCC compile warnings ( #1533 )
2019-01-04 23:10:39 +03:30
cclauss
26c5b54fb0
CircleCI: Test for Python 3 syntax errors and undefined names ( #1522 )
...
Catch missing imports and errors like #1520 and #1521
__E901,E999,F821,F822,F823__ are the "_showstopper_" [flake8](http://flake8.pycqa.org ) issues that can halt the runtime with a SyntaxError, NameError, etc. Most other flake8 issues are merely "style violations" -- useful for readability but they do not effect runtime safety.
* F821: undefined name `name`
* F822: undefined name `name` in `__all__`
* F823: local variable name referenced before assignment
* E901: SyntaxError or IndentationError
* E999: SyntaxError -- failed to compile a file into an Abstract Syntax Tree
2018-12-31 07:00:43 +03:30
cclauss
f4da28b1f1
Python 3 fixes to gen-os2-unicode-ranges.py ( #1521 )
...
In Python 3, __reload()__ was moved and __sys.setdefaultencoding()__ because the default is already utf-8. Also __Error()__ is an _undefined name_ and __Exception()__ creates a generic exception.
2018-12-30 15:28:34 +03:30
Behdad Esfahbod
d092fb2719
Ouch! Fix build on C++<11
2018-12-30 01:53:03 -05:00
Behdad Esfahbod
89949ed28d
Fix ubsan with passing nullptr to qsort()
2018-12-30 01:52:19 -05:00
Behdad Esfahbod
357a0a7ad3
Fix build on C++ < 11
2018-12-27 18:29:23 -05:00
Behdad Esfahbod
54c0a17310
[vector] Fix warning
2018-12-27 18:28:07 -05:00
Behdad Esfahbod
1043ddbee8
[aat] Minor
2018-12-27 18:27:11 -05:00
Behdad Esfahbod
71da9ca62f
[vector] Remove use of arrayZ() by using casts
2018-12-27 18:01:06 -05:00
Behdad Esfahbod
fa333e34d6
[vector] Remove static_array
...
Was good idea, but with C++ types with constructor/destructor, was getting in
the way as compiler was destructing those items where it was not desired.
Since C++ does not allow zero-sized arrays, just remove it...
2018-12-27 17:56:22 -05:00
Behdad Esfahbod
ab2258a419
[vector] Use allocated = -1 to signify failure
2018-12-27 17:45:05 -05:00
Michiharu Ariza
09fa536d89
fix lealk with cff2::accelerator_templ_t::topDict ( #1517 )
2018-12-27 11:33:09 -05:00
Behdad Esfahbod
3b81442cd5
[vector] Change pre-alloced count from 8 to 2
...
I'm thinking about dropping it to zero, but that needs slight code changes.
2018-12-24 11:31:04 -05:00
Behdad Esfahbod
d25a2f1496
Fix a few warnings
2018-12-23 20:34:24 -05:00
Behdad Esfahbod
85003b594b
[iter] Fix warning
2018-12-23 20:34:24 -05:00
Behdad Esfahbod
e4355b1ca1
[set] Add iter_t as alias to const_iter_t
2018-12-23 20:34:24 -05:00
Behdad Esfahbod
33f8de6186
[set] Change to const_iter
2018-12-23 20:34:24 -05:00
Behdad Esfahbod
f88fed5cd8
[set] Cache length in iterator
2018-12-23 20:34:24 -05:00
Ebrahim Byagowi
d0a706c7fd
Minor, remove redundant inline
2018-12-22 20:07:57 +03:30
Ebrahim Byagowi
ae6e348d64
Minor, tweak spaces
2018-12-22 20:07:57 +03:30
Michiharu Ariza
29f0b6bce7
CFF renaming ( #1507 )
...
* reimplement ByteStr as byte_str_t based on hb_ubytes_t
Unuse start_embed<ByteStr>
Also renamed SubByteStr to byte_str_ref_t
More renaming to come
* substr renamed to str_ref in line with its type byte_str_ref_t
* uncamelize non-table struct names
* uncamelized non-struct types OpCode etc
* add byte_str_t copy ctor
* test
* test2
* undo tests
* fix bot failure
* undo the previous change
* fixed tabs, added inline
* Revert "fixed tabs, added inline"
This reverts commit 21163c30e9
.
* fix tabs
2018-12-22 10:47:04 -05:00
Behdad Esfahbod
89d04129e2
[set] Actually derive iterator from hb_sorted_iter_t<>
2018-12-21 20:07:52 -05:00
Behdad Esfahbod
fc35919d01
[set] Implement unified iterator
2018-12-21 20:06:17 -05:00
Behdad Esfahbod
4911e67d2d
[set] Mark some internals protected
2018-12-21 20:00:52 -05:00
Behdad Esfahbod
954b985422
[iter] Add hb_sorted_iter_t<>
2018-12-21 19:55:02 -05:00
Behdad Esfahbod
b205105c9e
[iter] Change operator[] operand to be signed
...
To fix older compilers again (this was the case in hb_array_t).
hb-ot-layout-common.hh:1353: note: candidate 2: operator[](T*, int) <built-in>
hb-ot-layout-common.hh:1354: 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-iter.hh:63: note: candidate 1: Item& hb_iter_t<Iter, Item>::operator[](unsigned int) const [with Iter = hb_array_t<const OT::IntType<short unsigned int, 2u> >, Item = const OT::IntType<short unsigned int, 2u>]
hb-ot-layout-common.hh:1354: note: candidate 2: operator[](T*, int) <built-in>
hb-ot-layout-common.hh: In member function 'bool OT::ClassDef::serialize(hb_serialize_context_t*, hb_array_t<const OT::IntType<short unsigned int, 2u> >, hb_array_t<const OT::IntType<short unsigned int, 2u> >)':
hb-ot-layout-common.hh:1490: 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-iter.hh:63: note: candidate 1: Item& hb_iter_t<Iter, Item>::operator[](unsigned int) const [with Iter = hb_array_t<const OT::IntType<short unsigned int, 2u> >, Item = const OT::IntType<short unsigned int, 2u>]
hb-ot-layout-common.hh:1490: note: candidate 2: operator[](T*, int) <built-in>
2018-12-21 19:48:21 -05:00
Behdad Esfahbod
25786f49c1
[array] Port to hb_iter_t<>
...
hb_array_t is its own iterator...
2018-12-21 19:29:00 -05:00
Behdad Esfahbod
2a33ab0560
[iter] Change __more__ to fallback to __len__
2018-12-21 18:53:01 -05:00
Behdad Esfahbod
474a12058d
[array/vector] Rename len to length
2018-12-21 18:53:01 -05:00
Behdad Esfahbod
2fc1860a5b
[iter] Split hb_iter_t<> into hb_iter_t<> and hb_iter_mixin_t<>
2018-12-21 18:09:45 -05:00
Behdad Esfahbod
865deeb3be
Adjust internal header dependencies
2018-12-21 17:46:10 -05:00
Behdad Esfahbod
8e5c2bc60b
[Makefile.am] Minor
2018-12-21 17:29:11 -05:00
Behdad Esfahbod
f419cef417
[iter] Include from hb.hh
2018-12-21 17:22:09 -05:00
Behdad Esfahbod
7557e34872
[iter] Move hb_fill() and hb_copy() to hb-iter.hh
2018-12-21 17:21:19 -05:00
Behdad Esfahbod
5e1840e031
[iter] Disallow copy-construction or assignment of hb_iter_t<>
...
Should only be done by subclass.
2018-12-21 16:39:57 -05:00
Behdad Esfahbod
65e8bd56ad
[iter] Fix hb_copy() return value
2018-12-21 16:20:30 -05:00
Behdad Esfahbod
40d71211a8
[iter] Add const_iter_t / const_iter()
2018-12-21 16:19:44 -05:00
Behdad Esfahbod
aaddfaa57a
[iter] Make hb_fill() take collection type, not iter
...
Starting to get the hang of when take which.
2018-12-21 16:04:38 -05:00
Behdad Esfahbod
7b4eea853c
[array] Add more hb_array() / hb_sorted_array() variants
2018-12-21 16:02:16 -05:00
Behdad Esfahbod
09740148e3
[serialize] Use component_list by reference, as a supplier
2018-12-21 15:56:01 -05:00
Behdad Esfahbod
3dbe1e364c
[iter] Add .random_access()
2018-12-21 15:53:09 -05:00
Behdad Esfahbod
20f14b4aa6
[iter] Fix __end__()
2018-12-21 15:19:22 -05:00
Behdad Esfahbod
95265aeab7
[array] Remove copy constructor
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1502
2018-12-21 15:12:55 -05:00
Behdad Esfahbod
69d232eaea
Fix bot
...
C:\projects\harfbuzz\src\hb-uniscribe.cc(709): error C2666: 'hb_vector_t<OPENTYPE_FEATURE_RECORD,8>::operator +': 3 overloads have similar conversions [C:\projects\harfbuzz\build\harfbuzz.vcxproj]
2018-12-21 15:08:06 -05:00
Behdad Esfahbod
b9a51f5310
Minor
2018-12-21 15:05:00 -05:00
Behdad Esfahbod
bdb6da7226
[iter] Fix test again
2018-12-21 11:20:27 -05:00
Behdad Esfahbod
e952075248
Minor
2018-12-21 11:15:16 -05:00