Behdad Esfahbod
8206569d63
[map] Remove hashmap create/destroy/vtable
...
Unused now.
2023-01-11 13:24:50 -07:00
Behdad Esfahbod
adf0bd6dcd
[test-map] Add a test
2023-01-10 17:05:19 -07:00
Behdad Esfahbod
dc7b3a627d
[test-map] Another test
2023-01-05 10:49:10 -07:00
Behdad Esfahbod
a8df5cb07d
[test-map] Test keys() / values()
2023-01-05 10:47:47 -07:00
Behdad Esfahbod
4f6079138d
[map] Add hb_map_update()
2023-01-04 13:58:46 -07:00
Behdad Esfahbod
ffafcf9633
[map] Add hb_map_next()
2023-01-04 12:56:42 -07:00
Behdad Esfahbod
f2851e4157
[test-map] Test has() getter with unique-ptr
2022-11-23 16:50:30 -07:00
Behdad Esfahbod
86a763c651
[map] Make keys moveable
2022-11-21 20:53:44 -07:00
Behdad Esfahbod
cf20d2ec5d
[map] Take const key
2022-11-21 20:47:17 -07:00
Behdad Esfahbod
3d1c76f713
[serializer] Don't hash objects twice
2022-11-21 19:40:32 -07:00
Behdad Esfahbod
3ff8abf272
Revert "[map] Allow std::move-ing keys into the map"
...
This reverts commit f657ef7e57
.
This breaks many compilers with messages like this:
hb-subset-plan.hh:226: undefined reference to `OT::head::tableTag'
I'm out of my depth re how to fix it.
2022-11-18 19:38:12 -07:00
Behdad Esfahbod
a3a218edb5
[map] Add a couple more sink interfaces
2022-11-18 19:24:41 -07:00
Behdad Esfahbod
90226eab89
[test-map] Test inserting shared_ptr key
2022-11-18 19:21:58 -07:00
Behdad Esfahbod
f657ef7e57
[map] Allow std::move-ing keys into the map
2022-11-18 19:17:03 -07:00
Behdad Esfahbod
e74b372b59
[test-map] Test moving values
2022-11-18 18:43:31 -07:00
Behdad Esfahbod
a9c6a20b19
[map] Support moving value in sink interface
2022-11-18 18:29:12 -07:00
Behdad Esfahbod
fa0e4b041d
[test-map] Test sink interface
2022-11-18 18:20:14 -07:00
Behdad Esfahbod
4caad5720c
[test-map] Add test for reset
...
I expect this to leak now, since we don't destruct items.
2022-11-17 15:51:39 -07:00
Behdad Esfahbod
fc22d706fe
[test-map] Don't insert null smart-pointers in map
...
Dereferencing them is not supported anymore after
3aad7c2ddf
We don't support that for regular pointers, so don't supporting
them for smart-pointers sounds right to me.
2022-11-17 15:47:43 -07:00
Behdad Esfahbod
7595fa2d9a
[map] Fix copy-assignment operator
...
Ouch!
2022-11-17 15:23:14 -07:00
Behdad Esfahbod
410c14bfa2
[map] Fix equality
...
Ouch!
2022-11-17 14:53:00 -07:00
Behdad Esfahbod
1bd1a37837
[test] Minor
2022-11-15 15:18:36 -07:00
Qunxin Liu
dbb7f47b19
fix bug in hb_hashmap_t has() interface
...
It was not working when the value type is hb_bytes_t because hb_array_t
overloaded operator &
2022-11-03 13:48:23 -06:00
Qunxin Liu
c335bf469f
support dereferencing shared_ptrs and unique_ptrs
2022-09-27 15:44:29 -06:00
Behdad Esfahbod
61c0438425
[map] Allow geting non-const value pointer out with has()
2022-07-20 14:43:58 -06:00
Behdad Esfahbod
485f043211
[map] Enable using hashmap with unique_ptr
2022-07-20 14:34:55 -06:00
Behdad Esfahbod
d8f9d51780
[hashmap] Add keys_ref() and values_ref()
2022-07-12 13:19:31 -06:00
Behdad Esfahbod
88f00ecb84
[map] Fix iter_ref () and test it
2022-06-03 01:30:27 -06:00
Behdad Esfahbod
997d9cc466
[map] Make unique_ptr hashable
2022-06-02 18:47:42 -06:00
Behdad Esfahbod
f0a0dcad70
[test-map] Test hashing shared_ptr
2022-06-02 11:25:56 -06:00
Behdad Esfahbod
4c1b5d9ece
Whitespace
2022-06-02 11:25:11 -06:00
Behdad Esfahbod
3f78a71ca0
[map] Finally! Just can usd hb_hashmap_t<obj_t, obj_t>
...
Yay!
2022-06-02 11:23:37 -06:00
Behdad Esfahbod
0ccab339f9
[map] Remove invalid-key template arguments since unused
2022-06-02 11:23:37 -06:00
Behdad Esfahbod
3f6a8f69a0
[map] Remove invalid-key special-casing
...
Can override invalid-key value now.
2022-06-02 11:23:37 -06:00
Behdad Esfahbod
0d3d5b62ae
[cplusplus] Adjustments
2022-06-02 18:22:05 +01:00
Behdad Esfahbod
0b35940a72
Make hb::shared_ptr hashable
2022-06-02 18:22:05 +01:00
Behdad Esfahbod
e0f3cab246
[cplusplus] Add hb-cplusplus.hh
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/2152
2022-06-02 18:22:05 +01:00
Behdad Esfahbod
fc5739ea90
[test-map] Whitespace
2022-05-30 05:54:20 -06:00
Behdad Esfahbod
2d0b1248b2
[test-map] Test hb_set_t hash stability
...
Fails currently.
2022-05-19 13:53:53 -06:00
Behdad Esfahbod
561e02fefb
[map] Make hb_map_t hashable
2022-05-19 13:41:53 -06:00
Behdad Esfahbod
ad17699089
[map] Add is_equal() / towards making hb_map_t hashable
...
New API:
+ hb_map_is_equal()
2022-05-19 13:36:12 -06:00
Behdad Esfahbod
14a24d8e3f
[vector] Make hb_vector_t hashable
2022-05-19 13:04:06 -06:00
Behdad Esfahbod
124f9aeb9b
[set] Make hb_set_t hashable
2022-05-19 12:58:02 -06:00
Behdad Esfahbod
7fa580bc4f
[map] Fix map copy/move constructors to actually work
...
Ouch!
2022-05-12 13:05:32 -06:00
Garret Rieger
ff4e8c7eac
[map] Fix bad memory access if hb_map.fini() was called twice.
2022-01-14 16:42:39 -08:00
Behdad Esfahbod
956e0a4d13
[map] Destruct objects
2022-01-13 15:07:10 -07:00
Behdad Esfahbod
bc0a5fdf43
[test-map] Add disabled tests with std::string
2022-01-13 13:34:22 -07:00
Behdad Esfahbod
e456922a76
[test] Fix nullptr_t scope issue
2021-11-19 12:04:08 -07:00
Behdad Esfahbod
5157cac0e2
[test] Silence unused-variable erros in test
2021-11-19 12:03:10 -07: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