From 990443e5f282ad61de00dcf1ebff9cf1d5bc2d70 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 23 Apr 2010 17:53:32 -0400 Subject: [PATCH] Remove lock_instance() --- src/hb-font.cc | 2 +- src/hb-open-type-private.hh | 4 ---- src/hb-ot-layout.cc | 6 +++--- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/hb-font.cc b/src/hb-font.cc index 5e4e02c..4fdb569 100644 --- a/src/hb-font.cc +++ b/src/hb-font.cc @@ -227,7 +227,7 @@ _hb_face_get_table_from_blob (hb_tag_t tag, void *user_data) { hb_face_t *face = (hb_face_t *) user_data; - const OpenTypeFontFile &ot_file = Sanitizer::lock_instance (face->blob); + const OpenTypeFontFile &ot_file = *CastP (hb_blob_lock (face->blob)); const OpenTypeFontFace &ot_face = ot_file.get_face (face->index); const OpenTypeTable &table = ot_face.get_table_by_tag (tag); diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index daf0c40..ccd26dc 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -332,10 +332,6 @@ struct Sanitizer return hb_blob_create_empty (); } } - - static const Type& lock_instance (hb_blob_t *blob) { - return *CastP (hb_blob_lock (blob)); - } }; diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc index 96a0d9a..757722b 100644 --- a/src/hb-ot-layout.cc +++ b/src/hb-ot-layout.cc @@ -47,13 +47,13 @@ _hb_ot_layout_init (hb_face_t *face) memset (layout, 0, sizeof (*layout)); layout->gdef_blob = Sanitizer::sanitize (hb_face_get_table (face, HB_OT_TAG_GDEF)); - layout->gdef = &Sanitizer::lock_instance (layout->gdef_blob); + layout->gdef = CastP (hb_blob_lock (layout->gdef_blob)); layout->gsub_blob = Sanitizer::sanitize (hb_face_get_table (face, HB_OT_TAG_GSUB)); - layout->gsub = &Sanitizer::lock_instance (layout->gsub_blob); + layout->gsub = CastP (hb_blob_lock (layout->gsub_blob)); layout->gpos_blob = Sanitizer::sanitize (hb_face_get_table (face, HB_OT_TAG_GPOS)); - layout->gpos = &Sanitizer::lock_instance (layout->gpos_blob); + layout->gpos = CastP (hb_blob_lock (layout->gpos_blob)); } void -- 2.7.4