src/hb-iter.hh

Branch


Log

Author Commit Date CI Message
higher-performance 2ce548a7 2025-10-13T15:11:15 Clean up std::forward to match spelling of argument type (#5608) This helps readability and also avoids false positives during static analysis.
Behdad Esfahbod a220479f 2025-07-26T06:10:31 Remove std::forward inside loops (#5424) * [iter,cff] Remove std::forward from inside loops Was moving multiple times, if args were movable. * [CPAL] Handle an error * [serialize] Remove another std::forward in a loop * [bit-page] Fix a static-analysis out-of-range warning Code was safe. Just rewrite. * [ot-layout] Remove another std::forward from inside a loop
Behdad Esfahbod ef04b5c2 2024-02-06T14:58:05 Try fixing MSVC builds
Garret Rieger db700b56 2023-06-12T23:38:26 [subset] fix fuzzer timeout. Fixes: https://oss-fuzz.com/testcase-detail/6681253479579648. Limits iteration of coverage table during MATH subset to valid glyphs.
Behdad Esfahbod 988e4f06 2023-06-07T15:57:47 [iter] Comment
Behdad Esfahbod 0364c69e 2023-06-07T15:52:18 [iter] Add has_fast_len Set iterators are not random_access, but have fast len().
Behdad Esfahbod ad620af6 2023-06-07T14:59:22 Revert "[iter] Another try at writing some for loops as range loops" This reverts commit 69c6928289cad871b5b096fbdcd2827fdb80c3ad. This had code size increase, and slows down non-random-access iterators since it accesses __end__ which is O(n).
Behdad Esfahbod 69c69282 2023-06-07T14:11:02 [iter] Another try at writing some for loops as range loops
Behdad Esfahbod 78082357 2023-06-07T12:43:05 Revert "[iter] Rewrite some loops as range loops" This reverts commit 7a5242a30f3c41755a095909989221b4d22690ef. This times out test-set. Obviously broke something (in hb_all I think). Not bothering to figure out right now.
Behdad Esfahbod 7a5242a3 2023-06-07T12:36:15 [iter] Rewrite some loops as range loops
Behdad Esfahbod de729ec1 2023-06-03T15:48:54 [meta] Return reference from reference-wrapper
Behdad Esfahbod e1dc4920 2023-01-26T12:11:35 [iter] Allow hb_len() to fetch c.len as non-function
Behdad Esfahbod e82a3c69 2022-11-21T12:00:10 [array/vector] Optimize range-based for-loop Avoid bounds-checking.
Behdad Esfahbod 0dc0da05 2022-07-06T12:33:37 [iter] Add hb_is_sorted_iterator(_of)
Behdad Esfahbod e1575f23 2022-06-10T07:41:39 [iter] Remove a few TODO items
Behdad Esfahbod 8a69e006 2022-01-13T16:17:34 [meta] Use std::addressof() instead of hb_addressof()
Behdad Esfahbod b7b0a15f 2022-01-13T15:33:27 [meta] Remove hb_add_const
Behdad Esfahbod 909dde9d 2022-01-13T15:30:10 [meta] Use std::is_reference instead of hb_is_reference
Garret Rieger 071aea42 2021-11-30T16:16:06 [iter] add specialized implementation for hb_concat forward when iterators are not random access.
Garret Rieger 2e935514 2021-11-30T16:02:05 [iter] fix forward implementation in hb_concat(). Add test coverage for forward.
Garret Rieger ca227411 2021-11-30T12:53:15 [iter] add hb_concat (a, b). Iterates over a, and then over b.
Behdad Esfahbod 6d555ce8 2021-11-02T00:18:22 [meta] Use std::forward instead of hb_forward()
Behdad Esfahbod bb48bf52 2021-07-08T10:53:45 Rename misc uses of "free" In preparation for fixing https://github.com/harfbuzz/harfbuzz/issues/3044
Behdad Esfahbod 5fce8898 2021-01-21T12:14:20 [iter] Allow passing rvalue iters to hb_fill()
Behdad Esfahbod 9510e918 2019-09-01T16:25:33 [iter] Partialize hb_zip()
Behdad Esfahbod c9eb913f 2019-08-31T15:21:02 [iter] Simplify hb_chop()
Behdad Esfahbod 67ec9fa9 2019-08-31T14:51:49 [iter] Add hb_chop()
Behdad Esfahbod 5828d8e8 2019-08-31T14:36:44 [iter] Add hb_take() specialization for arrays
Behdad Esfahbod 398b296f 2019-08-31T12:44:24 [iter] Add hb_len()
Behdad Esfahbod 875131d4 2019-08-31T12:42:52 [iter] Add hb_take()
Behdad Esfahbod 1f88dae9 2019-08-31T12:24:42 [iter] Make iota() accept invokable for increasing to next item
Behdad Esfahbod b1378d8a 2019-08-30T12:10:45 [iter] Add hb_repeat()
Behdad Esfahbod 966a18b9 2019-08-30T12:07:17 [iter] Remove some &&
Behdad Esfahbod de45775c 2019-08-30T12:02:46 [iter] Use hb_ridentity instead of lazy +
Behdad Esfahbod ce4d63be 2019-08-30T11:59:50 [iter] Separate hb_iota implementation from hb_range
Behdad Esfahbod 814dc3cb 2019-08-30T10:20:30 [iter] Rename Moving towards making iota useful for non-integers.
Behdad Esfahbod c72589f1 2019-08-29T15:45:21 [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...
Ebrahim Byagowi a0b4ac4d 2019-08-24T17:57:14 Turn 8 spaces to tab across the project According to the current code style of the project
Behdad Esfahbod 7bcc5dfa 2019-07-28T20:55:50 [iter] Fix accumulate to accept const types
Behdad Esfahbod 576065b4 2019-07-17T11:19:34 [iter] Fix reduce type deduction
Behdad Esfahbod ebf47a95 2019-05-15T15:14:26 [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.
Behdad Esfahbod f244224d 2019-05-15T14:19:20 [iter] Use default operators instead of redefining empty ones
Behdad Esfahbod 889dc1eb 2019-05-14T22:28:07 [iter] Remove sort categorization See comments.
Behdad Esfahbod 4d3cf2ad 2019-05-13T17:25:07 [iter] Fix zip iterator sortedness classification logic
Behdad Esfahbod 51376284 2019-05-13T15:36:14 [iter] Track strictly-sorted iterators This make output of hb_enumerate() sorted regardless of input iterator.
Behdad Esfahbod 7e02063f 2019-05-13T15:26:00 [iter] Minor
Behdad Esfahbod e98f0ddd 2019-05-13T13:53:06 Fix extra semi-colon
Behdad Esfahbod 606841b0 2019-05-11T11:54:30 [iter] Check for more before forwarding/rewinding past ends
David Corbett c1c122e7 2019-05-11T11:38:06 [iter] Fix filter rewinding
Behdad Esfahbod 79126df3 2019-05-11T11:23:31 [iter] Add hb_map_sorted() and hb_map_retains_sorting()
Behdad Esfahbod 19e08a14 2019-05-10T21:25:07 [iter] Adjust source_of/sink_of
Behdad Esfahbod 61d150c9 2019-05-10T20:06:31 [meta] Add integral_constant, true_t -> true_type, false_t -> false_type
Behdad Esfahbod 98974ac1 2019-05-10T11:18:52 [iter] Adjust is_source_of / is_sink_of There are two cases that we accept. Encode both.
Behdad Esfahbod ed972d5d 2019-05-09T16:58:28 [iter] Rewrite test functions Notably, add hb_is_source_of(,) and hb_is_sink_of(,) to replace most uses of hb_is_iterator_of(,).
Behdad Esfahbod 726002a6 2019-05-09T14:53:02 [iter] Make hb_is_iterator_of() check is_convertible Instead of is_cr_convertible.
Behdad Esfahbod 4f2ad75a 2019-05-09T12:07:45 [enumerate] Fix hb_enumerate() len for step=0
Behdad Esfahbod 5d263556 2019-05-09T11:08:25 [iter] Fix
Behdad Esfahbod 5da3c9c3 2019-05-09T11:30:31 [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().
Behdad Esfahbod 57a5256f 2019-05-09T11:30:27 [iter] Minor
Behdad Esfahbod 12dd56f8 2019-05-09T11:25:02 [iter] Minor
Behdad Esfahbod 46837910 2019-05-09T11:20:41 [iter] Allow negative step in hb_iota()
Behdad Esfahbod 087327af 2019-05-09T11:14:06 [iter] Minor
Behdad Esfahbod 64f0899a 2019-05-09T11:10:31 [iter] Bug fix
Behdad Esfahbod 2c24ea37 2019-05-09T11:07:38 [iter] Take start value in hb_enumerate() Also rewrite it via composition.
Behdad Esfahbod 7675d0d3 2019-05-09T11:02:56 [iter] Add hb_range() hb_range() is like Python range. hb_iota() has slightly different API. Ie. it takes a start, instead of end.
Behdad Esfahbod 71537f93 2019-05-09T10:46:49 [iota] end -> end_ to not shadow
Behdad Esfahbod 5875d775 2019-05-08T12:25:34 [iter] Rename hb_iter_t() to hb_iter_type<> and add hb_item_type<>
Behdad Esfahbod cdb61eb0 2019-05-08T11:00:18 [iter] Accept pointer in hb_iter() and hb_iter_t()
Behdad Esfahbod c93eeba9 2019-05-08T10:56:09 [iter] Accept pointer in hb_map()
Behdad Esfahbod 50dc3e7d 2019-05-08T10:35:02 Add hb_iota()
Behdad Esfahbod aa4ac13f 2019-05-08T10:02:30 [iter] Actually fix previous commit The iter objects shouldn't not be const. D'oh.
Behdad Esfahbod a66598e0 2019-05-08T09:56:29 [iter] For ref-qualified variants
Behdad Esfahbod 8479eb59 2019-05-08T09:48:55 [iter] Fix hb_sink() to accept rvalue
Behdad Esfahbod 710d459a 2019-05-08T09:33:09 [iter] Default predicates to hb_identity instead of hb_bool The bool conversion happens after predicate is called automatically.
Behdad Esfahbod fe14a400 2019-05-08T09:32:19 Adjust hb_all/any/none
Behdad Esfahbod bdbfdc92 2019-05-07T22:52:43 [iter] Add value and projection to hb_all/any/none Allows for eg, checking all values equal 2: hb_all (it, 2).
Behdad Esfahbod cf61acb9 2019-05-07T22:45:01 [iter] Accept rvalues to hb_enumerate()
Behdad Esfahbod af571dbf 2019-05-07T21:39:20 [meta] Replace most hb_enable_if with hb_requires They do absolutely same thing. hb_requires is to encode constraints, whereas hb_enable_if is for more conditional enabling.
Behdad Esfahbod 41248cce 2019-05-07T20:54:31 Remove MIN/MAX in favor of hb_min/hb_max
Behdad Esfahbod 7654ebe3 2019-05-07T16:53:03 Whitespace
Behdad Esfahbod c09d6c58 2019-05-07T14:09:00 [iter] Require lvalue in operators that return reference
Behdad Esfahbod 8903040f 2019-05-07T00:13:11 Actually make it work
Behdad Esfahbod 025eaa3c 2019-05-07T00:05:37 [iter] Make filter/map copyable
Behdad Esfahbod 0b1ca5a1 2019-05-06T23:04:32 [iter] Adjust hb_filter
Behdad Esfahbod 4c2fd05c 2019-05-06T19:57:15 [iter] Implement range-based for loops Part of https://github.com/harfbuzz/harfbuzz/issues/1648
Ebrahim Byagowi 92588782 2019-04-30T13:05:10 Remove space between right angle brackets now that we have C++11 (#1689)
Behdad Esfahbod 73c82f23 2019-04-26T13:16:48 [iter] Fix hb_is_iterator_of() to actually check item type
Behdad Esfahbod 714307cc 2019-04-24T10:56:12 [iter] Remove fixed TODO
Behdad Esfahbod ae8da4b6 2019-04-22T15:25:11 Minor
Behdad Esfahbod 6916b778 2019-04-16T18:33:51 One more auto return type
Behdad Esfahbod 54ece299 2019-04-16T16:45:53 Use type aliasing for meta-functions, ie. those returning a type
Behdad Esfahbod b8e763fd 2019-04-16T10:50:22 [meta] Add hb_invoke()
Behdad Esfahbod a3fcb9a3 2019-04-16T10:45:20 [meta] Add HB_AUTO_RETURN_EXPR, HB_VOID_RETURN_EXPR, hb_priority, hb_has(), hb_get() The first three based on range-v3.
Behdad Esfahbod 89fea216 2019-04-15T17:36:09 Fix copyright
Behdad Esfahbod 02d864aa 2019-04-15T15:39:03 Add HB_FUNCOBJ() Fixes https://github.com/harfbuzz/harfbuzz/issues/1651
Behdad Esfahbod a98e4068 2019-04-12T22:42:44 Revert "Hide symbols in hb-iter" This reverts commit 98f14c4cdb837a962083a6702f401d41b4c1ec5c. Same as previous commit.
Behdad Esfahbod 98f14c4c 2019-04-12T18:11:18 Hide symbols in hb-iter Painful. All template methods need to be explicitly hidden :(. Maybe we should switch to -fvisibility=hidden pragma. A LOT more to go.
Behdad Esfahbod 2bd27502 2019-04-03T15:31:53 [iter] Tweak SFINAE again Don't think we need hb_is_same().
Behdad Esfahbod d419a9a4 2019-04-03T14:18:19 [iter] Use different SFINAE scheme to make MSVC happy From Orvid King: TLDR; MSVC has some issues using sizeof(declval<T>()) for SFINAE of templated types, so I just used SFINAE in a different context where MSVC doesn't have the issue.
Behdad Esfahbod 42ab32cb 2019-04-02T18:41:33 [iter] Remove passing pointer to hb_iter() While doable with hb_deref_pointer() as well, we also would then need to do it in a ton of places. Not worth it / messy.