Behdad Esfahbod
5153218b41
[set] Add hb_set_is_inverted()
2023-01-05 16:26:41 -07:00
Behdad Esfahbod
35f46e74d1
[map] Add hb_map_keys() and hb_map_values()
2023-01-04 17:12:08 -07:00
Behdad Esfahbod
d2a2670e54
[iter] Simplify has() interface implementations
2022-11-28 19:43:09 -07:00
Behdad Esfahbod
bcd59b5142
[set/map] Remove init_shallow/fini_shallow()
2022-07-20 15:58:28 -06:00
Behdad Esfahbod
97ea10a63a
Remove old nullptr_t hacks
...
Were used for hashmap before.
2022-06-02 11:23:38 -06:00
Behdad Esfahbod
58f848daa8
[set/map] Adjust hash function return type
2022-05-19 15:43:19 -06:00
Behdad Esfahbod
0623aa598b
[benchmark-set] Add benchmark for set copy
2022-05-19 15:43:15 -06:00
Behdad Esfahbod
124f9aeb9b
[set] Make hb_set_t hashable
2022-05-19 12:58:02 -06:00
Behdad Esfahbod
1f578b5a32
[set] Add pre-allocation internal API
2022-05-18 15:25:00 -06:00
Behdad Esfahbod
7fa580bc4f
[map] Fix map copy/move constructors to actually work
...
Ouch!
2022-05-12 13:05:32 -06:00
Behdad Esfahbod
a09dd87ca3
[set] Fix set copy/move constructors to actually work
...
Ouch!
2022-05-12 12:58:07 -06:00
Behdad Esfahbod
c81198b5bc
[set] Tweak move operators a bit
...
Should be equivalent.
2022-05-12 12:14:02 -06:00
Behdad Esfahbod
0a38878549
[set] Minor touch-up on the previous commit
2022-03-25 09:42:36 -06:00
Andrew John
0182988229
[set] Add call to export set contents to an array. ( #3500 )
...
[set] Add hb_set_next_many.
2022-03-25 09:36:44 -06:00
Behdad Esfahbod
394f772937
[map] Allow storing classes in the hashmap
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3293
The trick was to change the type of the invalid key/value to be non-class.
2021-11-19 11:49:23 -07:00
Behdad Esfahbod
811f80a701
[algs] Use std::move instead of hb_move()
2021-11-02 00:17:54 -06:00
Behdad Esfahbod
3604f5f248
[algs] Include <initializer_list>
2021-11-01 22:37:42 -06:00
Behdad Esfahbod
e97e79967e
Verbiage
2021-11-01 21:34:46 -06:00
Behdad Esfahbod
34fa5e2901
[set] More default operators
2021-11-01 21:25:03 -06:00
Behdad Esfahbod
dcd18da611
[set] Add standard the 5 standard methods & tests
2021-11-01 20:55:30 -06:00
Behdad Esfahbod
93ac700da6
[set] Add copy-constructor/assignment again
2021-08-29 10:47:20 -06:00
Behdad Esfahbod
f0c3804fa2
[set] Add hb_bit_set_invertible_t and resurrect hb_set_invert()
...
Implementation is NOT complete yet.
2021-08-17 19:53:43 -06:00
Behdad Esfahbod
b5cdbdc030
[set] Turn hb_set_t into instance of template taking implementation t
2021-08-17 10:53:08 -06:00
Behdad Esfahbod
fad452bffb
[set] Move main functionality into hb_bit_set_t
...
To add inversion on top in hb_invertible_set_t and use that as hb_set_t.
2021-08-17 10:47:18 -06:00
Behdad Esfahbod
f245dc4db8
[set] Whitespace
2021-08-15 18:59:58 -06:00
Behdad Esfahbod
9b390f8c40
[set] Move page_t into hb-bit-page.hh
2021-08-15 18:59:58 -06:00
Behdad Esfahbod
0c3e02ee2d
[set] Add "inverted" to page_t::is_empty()
2021-08-15 18:59:58 -06:00
Behdad Esfahbod
9bd64fa077
[set] Add "inverted" to page_t::next/prev()
2021-08-15 18:59:58 -06:00
Behdad Esfahbod
c88e7ec935
[set] Add page_t::elt_maybe_invert()
2021-08-15 18:59:58 -06:00
Behdad Esfahbod
9449cfeefd
[set] Simplify page_t::next/prev()
2021-08-15 18:59:58 -06:00
Behdad Esfahbod
4394ee1f1d
[set] Add inverted to page_t::get_min/max()
2021-08-15 18:59:58 -06:00
Behdad Esfahbod
0dcd9b15d9
[set] Add page_t::set_range()
2021-08-15 18:59:58 -06:00
Behdad Esfahbod
cb273fd17c
[set] Add page_t::set()
2021-08-15 18:59:58 -06:00
Behdad Esfahbod
32bbf53d9c
[set] Minor rewrite one cmp() in term of other
2021-08-15 18:59:58 -06:00
Behdad Esfahbod
2d54c34680
[subset/VarStore] Fix OOM in fuzzer test
...
The test in question is the one added in c68a00b92e
.
Culprit is that it's allocating lots of memory because of region_indices that
are out-of-range anyway. So, try to filter those out first.
2021-07-29 00:49:36 -06:00
Behdad Esfahbod
bf2c87bfe6
Add hb_memcpy() that does len=0 check
2021-07-27 13:26:00 -06:00
Behdad Esfahbod
b235511ed8
Merge pull request #3021 from googlefonts/stable_api
...
[subset] update hb_subset api with final changes before going stable.
2021-07-23 12:15:15 -07:00
Garret Rieger
c581d11eba
[set] in hb_set_set() avoid calling memcpy on nullptr.
2021-07-22 14:04:39 -07:00
Behdad Esfahbod
03cd9c5cba
Align lfind() API to match bfind()
2021-07-22 11:38:27 -07: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
bc33b87f5e
[set] Use references, not pointers, in internal C++ API
2021-06-09 11:54:12 -06:00
Behdad Esfahbod
9cfac093aa
[set] Add copy constructor/assignment
2021-06-09 11:43:35 -06:00
Garret Rieger
466e1fdf5d
[subset] remove unnessecary brackets.
2021-05-26 15:26:09 -06:00
Garret Rieger
583237299d
Add cmp() method for major to page map.
2021-05-26 15:26:09 -06:00
Garret Rieger
2c137045dc
[subset] Optimize set iteration by caching the last found page map index.
...
Reuse it if possible on consecutive calls to next(). Will signifcantly speed up cases where the entire set is iterated. In local testing iterating a very large set was 10x faster.
2021-05-26 15:26:09 -06:00
Behdad Esfahbod
9e5738a86a
[set] Okay, giving up on constexpr till C++14
...
../src/hb-set.hh:213:89: error: call to non-'constexpr' function 'const elt_t& hb_vector_size_t<elt_t, byte_size>::operator[](unsigned int) const [with elt_t = long long unsigned int; unsigned int byte_size = 64]'
2021-05-26 15:15:06 -06:00
Behdad Esfahbod
90fa558a5b
[set] Another try at constexpr to make msvc happy
2021-05-26 15:05:48 -06:00
Behdad Esfahbod
bf5d4a6392
[set] Add TODO
2021-05-26 14:27:02 -06:00
Behdad Esfahbod
11d03f1ff9
[set] Mark a couple methods as constexpr
2021-05-26 14:26:05 -06:00
Behdad Esfahbod
d2829ad374
[set] Refactor code into page_t::is_subset()
2021-05-26 14:24:27 -06:00