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
Behdad Esfahbod
879faa2aee
Rename
2018-12-21 01:57:40 -05:00
Behdad Esfahbod
a728c63a98
[vector] Add operator bool
2018-12-20 23:15:49 -05:00
Behdad Esfahbod
bd36977392
Rename
2018-12-20 23:14:24 -05:00
Ebrahim Byagowi
e412008599
Remove redundant void from C++ sources ( #1486 )
2018-12-17 13:01:01 -05:00
Behdad Esfahbod
0d0fe9df46
[arrays] Remove need of stride in Supplier<>
2018-12-16 22:31:13 -05:00
Behdad Esfahbod
3656f56d47
[arrays] Minor
2018-12-16 22:31:13 -05:00
Behdad Esfahbod
5a552f7546
[array] Move hb_array_t and related types to hb-array.hh
2018-12-16 22:31:10 -05:00
Behdad Esfahbod
01d06e34ff
Minor change to explicit_operator aesthetics
2018-12-16 14:27:43 -05:00
Ebrahim Byagowi
b2ebaa9afa
Remove redundant 'inline' from methods ( #1483 )
2018-12-16 14:08:10 -05:00
Behdad Esfahbod
f1352f7486
Add sub_array to hb_vector_t
2018-12-06 10:21:17 -08:00
Behdad Esfahbod
2087f5a2a7
Add casts to hb_array_t<>
2018-12-01 20:04:45 -05:00
Behdad Esfahbod
dfad19ad5a
Make operator [] take signed int
...
The built-in operator takes signed int. So, match it, such that
the built-in is never a better or equally-good match to our operator.
Fixes "ambiguous overload" errors from gcc 4.2 and VS 2008.
See https://github.com/harfbuzz/harfbuzz/issues/1374
2018-11-30 20:56:14 -05:00
Behdad Esfahbod
861bc75349
[vector] Make pointer cast explicit
...
Too bad this doesn't help MSVC 2008 build, as explicit operators are
C++11.
2018-11-29 14:34:44 -05:00