summaryrefslogtreecommitdiff
path: root/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-repacker.hh
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/hb-repacker.hh')
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-repacker.hh19
1 files changed, 11 insertions, 8 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-repacker.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-repacker.hh
index b1726d8beb3..2a9e75c45b1 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-repacker.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-repacker.hh
@@ -37,7 +37,6 @@
* For a detailed writeup on the overflow resolution algorithm see:
* docs/repacker.md
*/
-
struct graph_t
{
struct vertex_t
@@ -140,7 +139,8 @@ struct graph_t
* the 'packed' object stack used internally in the
* serializer
*/
- graph_t (const hb_vector_t<hb_serialize_context_t::object_t *>& objects)
+ template<typename T>
+ graph_t (const T& objects)
: parents_invalid (true),
distance_invalid (true),
positions_invalid (true),
@@ -1098,8 +1098,9 @@ struct graph_t
hb_vector_t<unsigned> num_roots_for_space_;
};
-static bool _try_isolating_subgraphs (const hb_vector_t<graph_t::overflow_record_t>& overflows,
- graph_t& sorted_graph)
+static inline
+bool _try_isolating_subgraphs (const hb_vector_t<graph_t::overflow_record_t>& overflows,
+ graph_t& sorted_graph)
{
unsigned space = 0;
hb_set_t roots_to_isolate;
@@ -1147,9 +1148,10 @@ static bool _try_isolating_subgraphs (const hb_vector_t<graph_t::overflow_record
return true;
}
-static bool _process_overflows (const hb_vector_t<graph_t::overflow_record_t>& overflows,
- hb_set_t& priority_bumped_parents,
- graph_t& sorted_graph)
+static inline
+bool _process_overflows (const hb_vector_t<graph_t::overflow_record_t>& overflows,
+ hb_set_t& priority_bumped_parents,
+ graph_t& sorted_graph)
{
bool resolution_attempted = false;
@@ -1207,8 +1209,9 @@ static bool _process_overflows (const hb_vector_t<graph_t::overflow_record_t>& o
* For a detailed writeup describing how the algorithm operates see:
* docs/repacker.md
*/
+template<typename T>
inline hb_blob_t*
-hb_resolve_overflows (const hb_vector_t<hb_serialize_context_t::object_t *>& packed,
+hb_resolve_overflows (const T& packed,
hb_tag_t table_tag,
unsigned max_rounds = 20) {
// Kahn sort is ~twice as fast as shortest distance sort and works for many fonts