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
6f74d80ed1
[vector] Complete sorted_vector 5-methods
2021-11-01 21:49:32 -06:00
Behdad Esfahbod
a28b5d03b5
[vector] Add swap() friend to hb_sorted_vector_t
2021-11-01 21:43:44 -06:00
Behdad Esfahbod
e97e79967e
Verbiage
2021-11-01 21:34:46 -06:00
Behdad Esfahbod
b6c0b40fc2
[vector] Use default constructor
2021-11-01 21:15:38 -06:00
Behdad Esfahbod
f15858be5f
[vector] Pre-allocate if iterator has random-access length
2021-11-01 20:26:07 -06:00
Behdad Esfahbod
ee75e716c1
[vector] Add initializer from iterable
2021-11-01 20:19:57 -06:00
Behdad Esfahbod
18a078f968
[vector] Implement move assignment using swap
2021-11-01 20:06:58 -06:00
Behdad Esfahbod
eeda2c549d
[vector] Add initializer_list constructor & tests
2021-11-01 18:50:11 -06:00
Behdad Esfahbod
c484641304
Revert "[vector] Add initializer_list constructor & tests"
...
This reverts commit aa6182453b
.
2021-11-01 18:48:24 -06:00
Behdad Esfahbod
aa6182453b
[vector] Add initializer_list constructor & tests
2021-11-01 18:36:57 -06:00
Behdad Esfahbod
8c05569930
[algs] Add hb_swap() ala, and using, std::swap()
...
Use it in vector.
Use ADL idiom.
2021-11-01 17:59:17 -06:00
Garret Rieger
5b882c420a
[repacker] performance optimizations for topological sorting.
...
- Presize the output sorted graph and write it once in the correct order to avoid needing to reverse.
- Swap the old/new graph vectors instead of copying.
- Use a boolean vector for tracking visited instead of a set.
2021-10-06 11:43:47 -07:00
Behdad Esfahbod
03cd9c5cba
Align lfind() API to match bfind()
2021-07-22 11:38:27 -07:00
Behdad Esfahbod
2337f0d047
Internally use hb_malloc/.../hb_free instead of malloc/.../free
...
Redefining those stock names as macros was conflicting with gcc 10
headers.
Fixes https://github.com/harfbuzz/harfbuzz/issues/3044
2021-07-08 10:54:09 -07:00
Garret Rieger
c5c13006a1
[subset] fix memory leaks found in https://oss-fuzz.com/testcase-detail/5179935334465536
2021-03-31 12:37:45 -06:00
Behdad Esfahbod
445efe8d04
m[vector] Recover vector from error in .reset()
2021-02-19 18:40:48 -07:00
Ebrahim Byagowi
08d57d9eca
Add hb_array_t::lfind
2020-06-28 13:13:25 +04:30
Ebrahim Byagowi
2dda6dd744
minor, tweak spacing
...
turn 8 spaces to tab, add space before Null/Crap
2020-04-20 16:18:29 +04:30
Ebrahim Byagowi
0558413f27
Minor, tweak spaces
2019-10-01 13:50:11 +03:30
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
Ebrahim Byagowi
aab8e08487
minor spacing fix ( #1869 )
2019-07-26 02:19:22 +04:30
Behdad Esfahbod
d822e0a16f
[array] Adjust operator!=
...
See comments.
2019-05-15 16:30:08 -07:00
Behdad Esfahbod
2fb3a8327a
[vector] Simplify arrayZ
...
Was turned into function when we had static ones and wanted to be
move-safe... Not the case anymore.
2019-05-10 18:43:48 -07:00
Behdad Esfahbod
5bffa9e375
More
2019-04-02 20:13:16 -07:00
Behdad Esfahbod
5b66b033fd
[serialize] Fix hb_hashmap_t<> for pointers and use in packed_map
2019-04-02 19:30:22 -07:00
Behdad Esfahbod
8a8d45b924
[iter] Adjust hb_copy() and use it
...
Untested.
2019-03-31 19:00:09 -07:00
Behdad Esfahbod
b189bbc48f
Implement hashing of objects
...
Should be improved for hb_bytes_t.
2019-03-30 19:41:48 -07:00
Behdad Esfahbod
7fd8228326
[serialize] Towards maintaining hashmap
2019-03-30 19:16:20 -07:00
Behdad Esfahbod
e6b78003ef
[vector] Add move semantics
2019-03-30 18:33:30 -07:00
Behdad Esfahbod
4c4d3c3ed5
[vector] Add some move and forwarding
2019-03-30 18:30:50 -07:00
Behdad Esfahbod
357c7c611c
[vector] Add copy constructor and assignment operator
2019-03-30 18:13:57 -07:00
Behdad Esfahbod
bed150bd2e
[serialize] Start fleshing out object stack
2019-03-30 17:43:43 -07:00
Behdad Esfahbod
58ad357951
[vector] Accept all types in push(...)
...
Let assignment operator worry about conversion.
2019-03-29 20:05:19 -07:00
Behdad Esfahbod
3f36c89f2e
Inline explicit_operator macro
...
Now that we require C++11, no need to macro.
2019-03-29 15:22:46 -07:00
Behdad Esfahbod
a30e13469e
[iter] Add operator << to set / vector
2019-01-28 16:39:01 -05:00
Behdad Esfahbod
090fe56dc6
Merge branch 'master' into iter
2019-01-25 16:06:52 +01:00
Behdad Esfahbod
70a52d6bd8
Convert all other enum class consts to static constexpr
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1553
2019-01-22 12:17:26 +01:00
Behdad Esfahbod
a4ea0d3680
[iter] Change from const_iter_t/iter_t to iter_t/writer_t
2019-01-20 20:12:12 -05:00
Behdad Esfahbod
815cde9fa3
[iter] Use is_sorted_iterator
2019-01-20 20:12:12 -05:00
Behdad Esfahbod
fd75d29f0f
[iter] Streamline vector iterators
2019-01-20 20:12:12 -05:00
Behdad Esfahbod
6dc4a1c9b1
[iter] Remove const_iter
2019-01-20 20:12:12 -05:00
Behdad Esfahbod
959bb58bdd
[vector] Add iterator
2019-01-20 20:12:12 -05:00
Behdad Esfahbod
54c0a17310
[vector] Fix warning
2018-12-27 18:28:07 -05:00
Behdad Esfahbod
fa333e34d6
[vector] Remove static_array
...
Was good idea, but with C++ types with constructor/destructor, was getting in
the way as compiler was destructing those items where it was not desired.
Since C++ does not allow zero-sized arrays, just remove it...
2018-12-27 17:56:22 -05:00
Behdad Esfahbod
ab2258a419
[vector] Use allocated = -1 to signify failure
2018-12-27 17:45:05 -05:00
Behdad Esfahbod
3b81442cd5
[vector] Change pre-alloced count from 8 to 2
...
I'm thinking about dropping it to zero, but that needs slight code changes.
2018-12-24 11:31:04 -05:00
Behdad Esfahbod
474a12058d
[array/vector] Rename len to length
2018-12-21 18:53:01 -05:00
Behdad Esfahbod
865deeb3be
Adjust internal header dependencies
2018-12-21 17:46:10 -05:00