From 9401829d4e93f6f433957fa2d053f3b9d42da557 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 22 Jul 2018 22:50:58 -0700 Subject: [PATCH] Remove Sanitizer<> --- src/hb-open-type-private.hh | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index 9a059a4..c59bb6a 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -362,20 +362,6 @@ struct hb_sanitize_context_t : }; - -/* Template to sanitize an object. */ -template -struct Sanitizer -{ - inline Sanitizer (unsigned int num_glyphs = 0) { c->set_num_glyphs (num_glyphs); } - inline hb_blob_t *sanitize (hb_blob_t *blob) { return c[0].template/*clang idiosyncrasy*/sanitize_blob (blob); } - - private: - hb_sanitize_context_t c[1]; -}; - - - /* * Serialize */ @@ -1285,7 +1271,7 @@ struct hb_table_lazy_loader_t hb_blob_t *b = (hb_blob_t *) hb_atomic_ptr_get (&blob); if (unlikely (!b)) { - b = OT::Sanitizer(face->get_num_glyphs ()).sanitize (face->reference_table (T::tableTag)); + b = OT::hb_sanitize_context_t().reference_table (face); if (!hb_atomic_ptr_cmpexch (&blob, nullptr, b)) { hb_blob_destroy (b); -- 2.7.4