From 53806e5b83cee0e275eac038d0780f95ac56588c Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 25 Nov 2020 11:51:37 -0700 Subject: [PATCH] Tiny improvement on previous commit Functionally the same. --- src/hb-blob.hh | 1 + src/hb-null.hh | 1 + src/hb-ot-layout-gsubgpos.hh | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hb-blob.hh b/src/hb-blob.hh index d85bd823b..b03dfc138 100644 --- a/src/hb-blob.hh +++ b/src/hb-blob.hh @@ -90,6 +90,7 @@ struct hb_blob_ptr_t unsigned int get_length () const { return b.get ()->length; } void destroy () { hb_blob_destroy (b.get ()); b = nullptr; } + private: hb_nonnull_ptr_t b; }; diff --git a/src/hb-null.hh b/src/hb-null.hh index 9853939b0..d09f858cd 100644 --- a/src/hb-null.hh +++ b/src/hb-null.hh @@ -177,6 +177,7 @@ struct hb_nonnull_ptr_t T * get () const { return v ? v : const_cast (&Null (T)); } T * get_raw () const { return v; } + private: T *v; }; diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh index 9ea27588d..cb95e6dcd 100644 --- a/src/hb-ot-layout-gsubgpos.hh +++ b/src/hb-ot-layout-gsubgpos.hh @@ -3380,7 +3380,7 @@ struct GSUBGPOS if (unlikely (!this->accels)) { this->lookup_count = 0; - hb_blob_destroy (this->table.get_blob ()); + this->table.destroy (); this->table = hb_blob_get_empty (); }