From 586b60622c33878f9ca4826b4ef07369d32bf039 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 27 Jun 2014 15:39:47 -0400 Subject: [PATCH] Minor: final bits of cleanup --- src/hb-open-type-private.hh | 1 + src/hb-ot-layout-common-private.hh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index b63daee9c..5f4cd42cf 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -728,6 +728,7 @@ struct OffsetTo : Offset inline bool neuter (hb_sanitize_context_t *c) { return c->try_set (this, 0); } + DEFINE_SIZE_STATIC (sizeof(OffsetType)); }; template static inline const Type& operator + (const Base &base, const OffsetTo &offset) { return offset (base); } diff --git a/src/hb-ot-layout-common-private.hh b/src/hb-ot-layout-common-private.hh index 2ed14a237..82e0fb7f3 100644 --- a/src/hb-ot-layout-common-private.hh +++ b/src/hb-ot-layout-common-private.hh @@ -502,7 +502,7 @@ struct Feature * Adobe tools, only the 'size' feature had FeatureParams defined. */ - Offset<> orig_offset = featureParams; + OffsetTo orig_offset = featureParams; if (unlikely (!featureParams.sanitize (c, this, closure ? closure->tag : HB_TAG_NONE))) return TRACE_RETURN (false); @@ -516,7 +516,7 @@ struct Feature unsigned int new_offset_int = (unsigned int) orig_offset - (((char *) this) - ((char *) closure->list_base)); - Offset<> new_offset; + OffsetTo new_offset; /* Check that it did not overflow. */ new_offset.set (new_offset_int); if (new_offset == new_offset_int &&