From cb1491f92e24649433988ff81a89347dccf07c8b Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 1 Aug 2018 22:50:45 -0700 Subject: [PATCH] Minor --- src/hb-blob-private.hh | 5 ----- src/hb-machinery-private.hh | 10 ++++++---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/hb-blob-private.hh b/src/hb-blob-private.hh index 56a7b668b..93fbc2d51 100644 --- a/src/hb-blob-private.hh +++ b/src/hb-blob-private.hh @@ -57,11 +57,6 @@ struct hb_blob_t HB_INTERNAL bool try_make_writable_inplace (void); HB_INTERNAL bool try_make_writable_inplace_unix (void); - inline void lock (void) - { - hb_blob_make_immutable (this); - } - template inline const Type* as (void) const { diff --git a/src/hb-machinery-private.hh b/src/hb-machinery-private.hh index ff56b1dc9..6617264b7 100644 --- a/src/hb-machinery-private.hh +++ b/src/hb-machinery-private.hh @@ -30,6 +30,8 @@ #define HB_MACHINERY_PRIVATE_HH #include "hb-private.hh" +#include "hb-blob-private.hh" + #include "hb-iter-private.hh" @@ -188,7 +190,7 @@ struct hb_sanitize_context_t : inline void start_processing (void) { - this->start = hb_blob_get_data (this->blob, nullptr); + this->start = this->blob->data; this->end = this->start + this->blob->length; assert (this->start <= this->end); /* Must not overflow. */ this->max_ops = MAX ((unsigned int) (this->end - this->start) * HB_SANITIZE_MAX_OPS_FACTOR, @@ -336,7 +338,7 @@ struct hb_sanitize_context_t : DEBUG_MSG_FUNC (SANITIZE, start, sane ? "PASSED" : "FAILED"); if (sane) { - blob->lock (); + hb_blob_make_immutable (blob); return blob; } else @@ -350,8 +352,8 @@ struct hb_sanitize_context_t : inline hb_blob_t *reference_table (const hb_face_t *face, hb_tag_t tableTag = Type::tableTag) { if (!num_glyphs_set) - set_num_glyphs (face->get_num_glyphs ()); - return sanitize_blob (face->reference_table (tableTag)); + set_num_glyphs (hb_face_get_glyph_count (face)); + return sanitize_blob (hb_face_reference_table (face, tableTag)); } mutable unsigned int debug_depth;