Behdad Esfahbod
e82a3c69dd
[array/vector] Optimize range-based for-loop
...
Avoid bounds-checking.
2022-11-21 12:00:10 -07:00
Behdad Esfahbod
0dc0da054d
[iter] Add hb_is_sorted_iterator(_of)
2022-07-08 12:01:38 -06:00
Behdad Esfahbod
e1575f2347
[iter] Remove a few TODO items
2022-06-10 07:41:39 -06:00
Behdad Esfahbod
8a69e00639
[meta] Use std::addressof() instead of hb_addressof()
2022-01-13 16:17:34 -07:00
Behdad Esfahbod
b7b0a15f7e
[meta] Remove hb_add_const
2022-01-13 15:33:27 -07:00
Behdad Esfahbod
909dde9df1
[meta] Use std::is_reference instead of hb_is_reference
2022-01-13 15:30:10 -07:00
Garret Rieger
071aea42c2
[iter] add specialized implementation for hb_concat forward when iterators are not random access.
2021-12-01 08:37:04 -07:00
Garret Rieger
2e935514d9
[iter] fix forward implementation in hb_concat().
...
Add test coverage for forward.
2021-12-01 08:37:04 -07:00
Garret Rieger
ca22741110
[iter] add hb_concat (a, b).
...
Iterates over a, and then over b.
2021-12-01 08:37:04 -07:00
Behdad Esfahbod
6d555ce82e
[meta] Use std::forward instead of hb_forward()
2021-11-02 00:18:22 -06:00
Behdad Esfahbod
bb48bf52a4
Rename misc uses of "free"
...
In preparation for fixing https://github.com/harfbuzz/harfbuzz/issues/3044
2021-07-08 10:54:09 -07:00
Behdad Esfahbod
5fce8898e0
[iter] Allow passing rvalue iters to hb_fill()
2021-01-21 12:15:10 -07:00
Behdad Esfahbod
9510e918f7
[iter] Partialize hb_zip()
2019-09-04 11:28:40 -04:00
Behdad Esfahbod
c9eb913f4c
[iter] Simplify hb_chop()
2019-08-31 15:21:02 -05:00
Behdad Esfahbod
67ec9fa9e4
[iter] Add hb_chop()
2019-08-31 14:51:49 -05:00
Behdad Esfahbod
5828d8e83c
[iter] Add hb_take() specialization for arrays
2019-08-31 14:36:44 -05:00
Behdad Esfahbod
398b296f3b
[iter] Add hb_len()
2019-08-31 12:44:24 -05:00
Behdad Esfahbod
875131d478
[iter] Add hb_take()
2019-08-31 12:42:52 -05:00
Behdad Esfahbod
1f88dae9f5
[iter] Make iota() accept invokable for increasing to next item
2019-08-31 12:24:56 -05:00
Behdad Esfahbod
b1378d8a21
[iter] Add hb_repeat()
2019-08-31 12:24:56 -05:00
Behdad Esfahbod
966a18b92a
[iter] Remove some &&
2019-08-31 12:24:56 -05:00
Behdad Esfahbod
de45775c37
[iter] Use hb_ridentity instead of lazy +
2019-08-31 12:24:56 -05:00
Behdad Esfahbod
ce4d63beec
[iter] Separate hb_iota implementation from hb_range
2019-08-31 12:24:56 -05:00
Behdad Esfahbod
814dc3cbe5
[iter] Rename
...
Moving towards making iota useful for non-integers.
2019-08-31 12:24:56 -05:00
Behdad Esfahbod
c72589f13f
[iter] Change item_size to get_item_size()
...
By moving access to hb_static_size(Type) into a function instead of
a class-const, we can refer to iter types of incomplete types, which
come handy when a method of hb_array_t wants to return iterator
of hb_array_t. That kind of stuff. Next commit needs this to
build on clang...
2019-08-29 15:45:21 -07:00
Ebrahim Byagowi
a0b4ac4dce
Turn 8 spaces to tab across the project
...
According to the current code style of the project
2019-08-27 02:40:41 +04:30
Behdad Esfahbod
7bcc5dfa97
[iter] Fix accumulate to accept const types
2019-07-28 20:55:50 -07:00
Behdad Esfahbod
576065b442
[iter] Fix reduce type deduction
2019-07-17 11:19:34 -07:00
Behdad Esfahbod
ebf47a95f2
[iter] Simplify operator!= of iterator filters
...
Both to save ops, and also because lambdas don't implement operator!=,
so this was failing in range-based for loop if a lambda was passed to
hb_map() or hb_filter(). Just check end-condition assuming that we
are comparing to .end() or iterators that are otherwise derived from
current iterator. Ie. don't compare things that are expected to be
in common.
2019-05-15 15:14:26 -07:00
Behdad Esfahbod
f244224dbb
[iter] Use default operators instead of redefining empty ones
2019-05-15 14:34:36 -07:00
Behdad Esfahbod
889dc1eb06
[iter] Remove sort categorization
...
See comments.
2019-05-14 22:28:07 -07:00
Behdad Esfahbod
4d3cf2adb6
[iter] Fix zip iterator sortedness classification logic
2019-05-13 17:25:07 -07:00
Behdad Esfahbod
513762849a
[iter] Track strictly-sorted iterators
...
This make output of hb_enumerate() sorted regardless of input iterator.
2019-05-13 15:36:14 -07:00
Behdad Esfahbod
7e02063f32
[iter] Minor
2019-05-13 15:26:00 -07:00
Behdad Esfahbod
e98f0ddd63
Fix extra semi-colon
2019-05-13 13:53:06 -07:00
Behdad Esfahbod
606841b070
[iter] Check for more before forwarding/rewinding past ends
2019-05-11 11:56:26 -07:00
David Corbett
c1c122e7b3
[iter] Fix filter rewinding
2019-05-11 11:52:40 -07:00
Behdad Esfahbod
79126df307
[iter] Add hb_map_sorted() and hb_map_retains_sorting()
2019-05-11 11:23:31 -07:00
Behdad Esfahbod
19e08a1467
[iter] Adjust source_of/sink_of
2019-05-10 21:25:07 -07:00
Behdad Esfahbod
61d150c916
[meta] Add integral_constant, true_t -> true_type, false_t -> false_type
2019-05-10 20:06:31 -07:00
Behdad Esfahbod
98974ac16f
[iter] Adjust is_source_of / is_sink_of
...
There are two cases that we accept. Encode both.
2019-05-10 11:26:49 -07:00
Behdad Esfahbod
ed972d5d73
[iter] Rewrite test functions
...
Notably, add hb_is_source_of(,) and hb_is_sink_of(,) to replace most
uses of hb_is_iterator_of(,).
2019-05-09 16:58:28 -07:00
Behdad Esfahbod
726002a6a6
[iter] Make hb_is_iterator_of() check is_convertible
...
Instead of is_cr_convertible.
2019-05-09 15:24:25 -07:00
Behdad Esfahbod
4f2ad75a83
[enumerate] Fix hb_enumerate() len for step=0
2019-05-09 12:07:45 -07:00
Behdad Esfahbod
5da3c9c33f
[iter] Fix hb_zip() end condition
...
We should compare-equal to end if either iterator's end reaches,
not if both reach at the same time. Fixes infinite-loop in test
which was happening after hb_enumerate() switched to using hb_zip().
2019-05-09 11:31:13 -07:00
Behdad Esfahbod
57a5256fbc
[iter] Minor
2019-05-09 11:31:13 -07:00
Behdad Esfahbod
12dd56f857
[iter] Minor
2019-05-09 11:31:13 -07:00
Behdad Esfahbod
46837910e6
[iter] Allow negative step in hb_iota()
2019-05-09 11:31:13 -07:00
Behdad Esfahbod
087327af1e
[iter] Minor
2019-05-09 11:31:13 -07:00
Behdad Esfahbod
64f0899a9f
[iter] Bug fix
2019-05-09 11:31:13 -07:00