Commit Graph

112 Commits

Author SHA1 Message Date
Ebrahim Byagowi 2dda6dd744 minor, tweak spacing
turn 8 spaces to tab, add space before Null/Crap
2020-04-20 16:18:29 +04:30
Behdad Esfahbod 858b627984 [machinery] Remove CastR<>() 2019-12-10 13:18:32 -06:00
Behdad Esfahbod b84ceb2fcf [machinery] Remove CastP 2019-12-10 13:02:48 -06:00
Behdad Esfahbod 85574ec287 [machinery] Minor 2019-12-10 12:52:32 -06:00
Behdad Esfahbod 35218c488c Minor
Allow empty HB_VAR_ARRAY definition.  Though, doesn't compile with any
compiler I know of.
2019-10-31 13:19:44 -07:00
Behdad Esfahbod 0e294c455e Rename VAR to HB_VAR_ARRAY 2019-09-06 16:54:27 -04:00
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
Behdad Esfahbod 17f0cfa7ea Move BEInt to hb.hh
I knows...
2019-03-31 21:34:19 -07:00
Behdad Esfahbod a7c63cd8f8 Split sanitize and dispatch into their own files 2019-03-30 14:59:40 -07:00
Behdad Esfahbod be66b575fc Move serializer to hb-serialize.hh 2019-03-30 14:53:54 -07:00
Behdad Esfahbod bb22462f29 Whitespace 2019-03-30 14:46:54 -07:00
Behdad Esfahbod 4c38a9f601 Remove hb_assign()
Not needed anymore.  We just use operator= now.
2019-03-29 20:23:07 -07:00
Behdad Esfahbod 4fd02f6ee5 Remove unused line 2019-03-29 17:58:23 -07:00
Behdad Esfahbod 9a5b15dc1e [C++11] Replace BEInt.set() with operator= 2019-03-29 17:58: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
Ebrahim Byagowi 8aaab78efc
Allow zero length ranges in sanitization (#1617)
Fixes fvar table sanitization where there are no named instance
by allowing zero length ranges starting from Null() address.

Fixes #1607
2019-03-14 16:49:42 -07:00
Behdad Esfahbod f398097529 More static constexpr 2019-01-25 16:08:25 +01:00
Behdad Esfahbod 447323b85a Better fix for -Wcast-align errors 2019-01-22 12:50:12 +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 c986ca15a6 Improve overflow avoidance
Better fix for 480406cd3e
This way we behave the same on 32bit and 64bit archs.
2019-01-15 13:58:19 -05:00
Behdad Esfahbod 480406cd3e Fix assertion on address overflow
Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=917031
2019-01-14 15:27:34 -05:00
Behdad Esfahbod f6d5f1e91c [iter] Add empty test 2018-12-21 00:23:46 -05:00
Behdad Esfahbod b80b97b549 Revert "Remove unused hb-iter.hh"
This reverts commit 969ff3c7aa.
2018-12-21 00:08:05 -05:00
Behdad Esfahbod e6ebc9b6f8 Remove unused typedef 2018-12-20 23:13:36 -05:00
Behdad Esfahbod 87f7c83fff [serializer] Add operator <<
Not sure if we are going to use it.  But might incentivize us to.
2018-12-20 15:54:17 -05:00
Behdad Esfahbod 5b70074edf Add hb_assign(obj, value) 2018-12-20 15:38:59 -05:00
Behdad Esfahbod 4220b7bdd7 Fix code on big-endian gcc / clang
Ouch!  We need a bigendian bot...

Fixes https://github.com/harfbuzz/harfbuzz/issues/1498
2018-12-20 11:48:45 -05:00
Behdad Esfahbod 5000a59a63 [saitnize] Minor 2018-12-19 22:27:09 -05:00
Behdad Esfahbod a62870506d [sanitize] Use hb_static_size instead of ::static_size
https://github.com/harfbuzz/harfbuzz/issues/1496#issuecomment-448818112
2018-12-19 21:05:00 -05:00
Behdad Esfahbod 9aebfb4182 [serialize] Streamline error propagation 2018-12-18 13:22:17 -05:00
Behdad Esfahbod 969ff3c7aa Remove unused hb-iter.hh
The ideas there are all part of hb-array.hh now.  To be determined how we
want to use generic iterator patterns.
2018-12-17 22:43:00 -05:00
Ebrahim Byagowi e412008599 Remove redundant void from C++ sources (#1486) 2018-12-17 13:01:01 -05:00
Behdad Esfahbod 92680361ec [arrays] Move Supplier<> to hb-array.hh 2018-12-16 23:38:51 -05:00
Behdad Esfahbod 2a3fa3f82f [arrays] Remove unnecessary constructor from Supplier<>
Looks like operator hb_array_t<> from vector works here. :)
2018-12-16 23:33:03 -05:00
Behdad Esfahbod 507cac4943 [arrays] Start moving Supplier<> to hb_array_t<> 2018-12-16 23:31:19 -05:00
Behdad Esfahbod 1e2c98126e [arrays] Remove unused stride from Supplier 2018-12-16 22:31:16 -05:00
Behdad Esfahbod dcfa4a8d71 [array] Remove custom hb_bytes_t implementation 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 6e33a3955d Minor 2018-12-13 16:40:01 -05:00
Behdad Esfahbod c78e4784fb [dispatch] Minor 2018-12-12 09:50:18 -05:00
Behdad Esfahbod 41d1a1c10f [subset] Minor 2018-12-11 22:48:27 -05:00
Behdad Esfahbod 2aba2c6c73 [serialize] Break down assert 2018-12-11 21:21:13 -05:00
Behdad Esfahbod fb05908213 Revert ugly fixes
Now that we have 6daf45e0, revert cryptic hacks...

This reverts commit abd81ed4f5.
This reverts commit 9c6921c08c.
This reverts commit d39760cabf.
This reverts commit fedd8e6c17.

Fixes https://github.com/harfbuzz/harfbuzz/issues/1374
2018-11-30 20:56:15 -05:00
Behdad Esfahbod abd81ed4f5 Umm. Cryptic, yes
In file included from hb-face.cc:35:
hb-ot-cmap-table.hh: In member function 'void OT::CmapSubtableFormat4::_compiles_assertion_on_line_388() const':
hb-ot-cmap-table.hh:388: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
hb-open-type.hh:354: note: candidate 1: const Type& OT::UnsizedArrayOf<Type>::operator[](unsigned int) const [with Type = OT::IntType<short unsigned int, 2u>]
hb-ot-cmap-table.hh:388: note: candidate 2: operator[](const T*, int) <built-in>
hb-ot-cmap-table.hh: In member function 'void OT::CmapSubtableFormat4::_instance_assertion_on_line_388() const':
hb-ot-cmap-table.hh:388: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
hb-open-type.hh:354: note: candidate 1: const Type& OT::UnsizedArrayOf<Type>::operator[](unsigned int) const [with Type = OT::IntType<short unsigned int, 2u>]
hb-ot-cmap-table.hh:388: note: candidate 2: operator[](const T*, int) <built-in>
hb-face.cc: In function 'hb_blob_t* _hb_face_builder_data_reference_blob(hb_face_builder_data_t*)':
hb-face.cc:650: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
hb-vector.hh:81: note: candidate 1: Type& hb_vector_t<Type, PreallocedCount>::operator[](unsigned int) [with Type = hb_face_builder_data_t::table_entry_t, unsigned int PreallocedCount = 32u]
hb-face.cc:650: note: candidate 2: operator[](T*, int) <built-in>
hb-face.cc:650: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
hb-vector.hh:81: note: candidate 1: Type& hb_vector_t<Type, PreallocedCount>::operator[](unsigned int) [with Type = hb_face_builder_data_t::table_entry_t, unsigned int PreallocedCount = 32u]
hb-face.cc:650: note: candidate 2: operator[](const T*, int) <built-in>
hb-face.cc:651: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
hb-vector.hh:81: note: candidate 1: Type& hb_vector_t<Type, PreallocedCount>::operator[](unsigned int) [with Type = hb_face_builder_data_t::table_entry_t, unsigned int PreallocedCount = 32u]
hb-face.cc:651: note: candidate 2: operator[](T*, int) <built-in>
hb-face.cc:651: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
hb-vector.hh:81: note: candidate 1: Type& hb_vector_t<Type, PreallocedCount>::operator[](unsigned int) [with Type = hb_face_builder_data_t::table_entry_t, unsigned int PreallocedCount = 32u]
hb-face.cc:651: note: candidate 2: operator[](const T*, int) <built-in>
2018-11-30 11:52:41 -05:00
Ebrahim Byagowi e7bd29ea11
Limit __builtin_bswap16 to GCC >= 5 as it was implemented on 4.8 2018-11-29 23:47:20 +03:30
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
Behdad Esfahbod 987f418772
Merge pull request #1398 from Adenilson/bigInt01
Optimize harfbuzz big integer conversions
2018-11-27 17:40:32 -05:00
Behdad Esfahbod 4e2a03b6b6
Comment 2018-11-27 17:40:09 -05:00