Commit Graph

8457 Commits

Author SHA1 Message Date
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
Behdad Esfahbod 35503d7d73 [iter] More prototyping 2018-12-21 03:03:46 -05:00
Behdad Esfahbod 73c7a896d1 [iter] Make hb_fill() and hb_copy() take iterators
I'm still going back and force...
2018-12-21 02:48:28 -05:00
Behdad Esfahbod 12e506fda4 [iter] Add hb_fill() 2018-12-21 02:47:04 -05:00
Behdad Esfahbod ad3ed58de5 [iter] Start prototyping hb_copy() 2018-12-21 02:25:58 -05:00
Behdad Esfahbod 44af738d19 [iter] Showcase implicit casts 2018-12-21 01:59:37 -05:00
Behdad Esfahbod 879faa2aee Rename 2018-12-21 01:57:40 -05:00
Behdad Esfahbod aeb696a91c [iter] Rename 2018-12-21 01:57:02 -05:00
Behdad Esfahbod 8001e00a47 [iter] First sample use 2018-12-21 01:53:27 -05:00
Behdad Esfahbod 19d2b5013d [iter] Add bidirectionality 2018-12-21 01:20:04 -05:00
Behdad Esfahbod 314d8698d0 [iter] Sketch new iterator design 2018-12-21 01:15:49 -05:00
Behdad Esfahbod f6d5f1e91c [iter] Add empty test 2018-12-21 00:23:46 -05:00
Behdad Esfahbod b80b97b549 Revert "Remove unused hb-iter.hh"
This reverts commit 969ff3c7aa.
2018-12-21 00:08:05 -05:00
Behdad Esfahbod a728c63a98 [vector] Add operator bool 2018-12-20 23:15:49 -05:00
Behdad Esfahbod bd36977392 Rename 2018-12-20 23:14:24 -05:00
Behdad Esfahbod e6ebc9b6f8 Remove unused typedef 2018-12-20 23:13:36 -05:00
Behdad Esfahbod 4941e95f10 2.3.0 2018-12-20 21:48:57 -05:00
Behdad Esfahbod 87f7c83fff [serializer] Add operator <<
Not sure if we are going to use it.  But might incentivize us to.
2018-12-20 15:54:17 -05:00
Behdad Esfahbod 5b70074edf Add hb_assign(obj, value) 2018-12-20 15:38:59 -05:00
Behdad Esfahbod 6124123393 [serialize] Adjust ClassDef
[skip ci]
2018-12-20 12:26:44 -05:00