summaryrefslogtreecommitdiff
path: root/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type.hh
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type.hh')
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type.hh26
1 files changed, 17 insertions, 9 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type.hh
index 896f7a0155f..de2d25638a3 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type.hh
@@ -298,20 +298,24 @@ struct OffsetTo : Offset<OffsetType, has_null>
}
template <typename ...Ts>
- bool serialize_subset (hb_subset_context_t *c, const Type &src, const void *base, Ts&&... ds)
+ bool serialize_subset (hb_subset_context_t *c,
+ const OffsetTo& src,
+ const void *src_base,
+ const void *dst_base,
+ Ts&&... ds)
{
*this = 0;
- if (has_null && &src == _hb_has_null<Type, has_null>::get_null ())
+ if (src.is_null ())
return false;
auto *s = c->serializer;
s->push ();
- bool ret = c->dispatch (src, hb_forward<Ts> (ds)...);
+ bool ret = c->dispatch (src_base+src, hb_forward<Ts> (ds)...);
if (ret || !has_null)
- s->add_link (*this, s->pop_pack (), base);
+ s->add_link (*this, s->pop_pack (), dst_base);
else
s->pop_discard ();
@@ -320,17 +324,21 @@ struct OffsetTo : Offset<OffsetType, has_null>
/* TODO: Somehow merge this with previous function into a serialize_dispatch(). */
template <typename ...Ts>
- bool serialize_copy (hb_serialize_context_t *c, const Type &src, const void *base, Ts&&... ds)
+ bool serialize_copy (hb_serialize_context_t *c,
+ const OffsetTo& src,
+ const void *src_base,
+ const void *dst_base,
+ Ts&&... ds)
{
*this = 0;
- if (has_null && &src == _hb_has_null<Type, has_null>::get_null ())
+ if (src.is_null ())
return false;
c->push ();
- bool ret = c->copy (src, hb_forward<Ts> (ds)...);
+ bool ret = c->copy (src_base+src, hb_forward<Ts> (ds)...);
- c->add_link (*this, c->pop_pack (), base);
+ c->add_link (*this, c->pop_pack (), dst_base);
return ret;
}
@@ -679,7 +687,7 @@ struct OffsetListOf : OffsetArrayOf<Type>
if (unlikely (!out)) return_trace (false);
unsigned int count = this->len;
for (unsigned int i = 0; i < count; i++)
- out->arrayZ[i].serialize_subset (c, (*this)[i], out);
+ out->arrayZ[i].serialize_subset (c, this->arrayZ[i], this, out);
return_trace (true);
}