Commit Graph

63 Commits

Author SHA1 Message Date
Behdad Esfahbod 322627ae1d Whitespace 2019-05-09 16:08:10 -07:00
Behdad Esfahbod 726002a6a6 [iter] Make hb_is_iterator_of() check is_convertible
Instead of is_cr_convertible.
2019-05-09 15:24:25 -07:00
Behdad Esfahbod 3476445420 Remove unnecessary template keyword
Should fix MSVC.
2019-05-08 21:14:01 -07:00
Behdad Esfahbod e8b45c1933 [array] Add .copy() 2019-05-08 16:37:38 -07:00
Behdad Esfahbod 41248cce0e Remove MIN/MAX in favor of hb_min/hb_max 2019-05-07 20:54:31 -07:00
Behdad Esfahbod 4c2fd05ca5 [iter] Implement range-based for loops
Part of https://github.com/harfbuzz/harfbuzz/issues/1648
2019-05-06 19:57:35 -07:00
Behdad Esfahbod c51f15ddfc [array] Adjust hb_sorted_array_t copy constructor/assignment to match hb_array_t 2019-04-26 13:04:06 -07:00
Behdad Esfahbod b2758c360c [array] Use hb_is_cr_convertible_to() 2019-04-26 13:04:06 -07:00
Behdad Esfahbod 91d958acc0 [array] Simplify copy assignment/constructor
To fix bogus MSVC warnings:

  c:\projects\harfbuzz\src\hb-array.hh(189): warning C4521: 'hb_array_t<Type>': multiple copy constructors specified [C:\projects\harfbuzz\build\harfbuzz.vcxproj]
  c:\projects\harfbuzz\src\hb-array.hh(189): warning C4522: 'hb_array_t<Type>': multiple assignment operators specified [C:\projects\harfbuzz\build\harfbuzz.vcxproj]
2019-04-18 10:04:10 -04:00
Behdad Esfahbod 54ece299bc Use type aliasing for meta-functions, ie. those returning a type 2019-04-16 16:45:53 -04:00
Behdad Esfahbod 1ae265888e Fix gcc warning 2019-04-15 11:31:40 -04:00
Behdad Esfahbod caa20e4ef9 Hide a few more symbols
Exposed by:

$ make CPPFLAGS=-O0
2019-04-12 18:00:58 -04:00
Behdad Esfahbod 95df00aec1 Hide a few static methods
Looks like static methods that do not get inlined end up exported.
We have a lot more.  Need to protect all at some point.  Wish there
was an easier way, like the visibility flag we pass that automatically
hides all inline methods.

Was exposed by check-symbols.sh when compiling on OS X 10.14 with:

$ make CPPFLAGS=-Oz CXXFLAGS=-flto=thin LDFLAGS=-lc++
2019-04-12 17:51:14 -04:00
Behdad Esfahbod f02ebc89ec [array] Add compy assignment operator since copy constructor is explicit 2019-04-03 15:23:06 -07:00
Behdad Esfahbod 20a73da2c9 [array] Add default copy constructor
MSVC seems to need it.
2019-04-03 14:32:15 -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 42ab32cbba [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.
2019-04-02 18:42:51 -07:00
Behdad Esfahbod d0da547b37 [array] Use dagger for hashing array
Also switch to better mixing.
2019-04-02 18:23:05 -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 849a0f1758 [iter] Add hb_iter_with_fallback_t instead 2019-01-29 17:10:19 -08:00
Behdad Esfahbod 4d40ed9d1a [iter] Add hb_iter_with_mixin_t<> 2019-01-29 13:55:23 -08:00
Behdad Esfahbod 84a25d79c6 [iter] Rename 2019-01-29 13:39:19 -08:00
Behdad Esfahbod 0363ce650b [iter] Accept C arrays in hb_iter() 2019-01-27 01:06:32 +01:00
Behdad Esfahbod 090fe56dc6 Merge branch 'master' into iter 2019-01-25 16:06:52 +01:00
Behdad Esfahbod 6e3ad650d1 Rename hb-dsalgs to hb-algs 2019-01-20 20:12:12 -05:00
Behdad Esfahbod 636786ecaf [iter] Rename __item_type__ to __item_t__ 2019-01-20 20:12:12 -05:00
Behdad Esfahbod 177a8af380 [array] SFINAE fun 2019-01-20 20:12:12 -05:00
Behdad Esfahbod 8e0a58e1b3 [array] Remove construction that was removing constness 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 b5d6fe1a45 [iter] Remove hb_sorted_iter_t
Not enforcing it using type hierarchy.
2019-01-20 20:12:12 -05:00
Behdad Esfahbod 6cd96ba1ac [iter] Make is_random_access_iterator a constant
We cannot rely on constexpr functions...
2019-01-20 20:12:12 -05:00
Behdad Esfahbod 8ac64d0090 [iter] Fix sorted_iter iter class 2019-01-20 20:12:12 -05:00
Behdad Esfahbod 5ec11ce13a [iter] Clarify readonly vs lvalue iterators
lvalue iterators must declare __item_type__ as a reference.
2019-01-20 20:12:12 -05:00
Behdad Esfahbod 570473a345 [iter] Make hb_sorted_array_t work as iter
Ugly, but does the job.
2019-01-20 20:12:12 -05:00
Behdad Esfahbod 89949ed28d Fix ubsan with passing nullptr to qsort() 2018-12-30 01:52:19 -05:00
Behdad Esfahbod 954b985422 [iter] Add hb_sorted_iter_t<> 2018-12-21 19:55:02 -05:00
Behdad Esfahbod 25786f49c1 [array] Port to hb_iter_t<>
hb_array_t is its own iterator...
2018-12-21 19:29:00 -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 7b4eea853c [array] Add more hb_array() / hb_sorted_array() variants 2018-12-21 16:02:16 -05:00
Behdad Esfahbod 95265aeab7 [array] Remove copy constructor
Fixes https://github.com/harfbuzz/harfbuzz/issues/1502
2018-12-21 15:12:55 -05:00
Behdad Esfahbod 879faa2aee Rename 2018-12-21 01:57:40 -05:00
Behdad Esfahbod bd36977392 Rename 2018-12-20 23:14:24 -05:00
Behdad Esfahbod 3d9d7dc4dd [arrays] Add hb_ubytes_t for unsigned char 2018-12-18 22:11:23 -05:00
Behdad Esfahbod f1e95e40ed [arrays] Remove hb_supplier_t<> 2018-12-18 16:49:08 -05:00
Behdad Esfahbod b1094fc2d2 [arrays] Minor tweaks to hb_supplier_t
I think I like to keep this hb_supplier_t thing separately from hb_array_t.
2018-12-17 22:41:04 -05:00
Behdad Esfahbod cf39c24205 [arrays] Rename Supplier to hb_supplier_t 2018-12-17 22:36:23 -05:00
Ebrahim Byagowi e412008599 Remove redundant void from C++ sources (#1486) 2018-12-17 13:01:01 -05:00
Behdad Esfahbod 381c3548e9 [array] Add cast operator to add const to Type
In lieu of constructor removed in previous commit.
2018-12-17 00:39:30 -05:00
Behdad Esfahbod 15acf33c22 [array] Remove problematic constructor 2018-12-17 00:38:13 -05:00