Remove lock_instance()

This commit is contained in:
Behdad Esfahbod 2010-04-23 17:53:32 -04:00
parent 187454c595
commit 990443e5f2
3 changed files with 4 additions and 8 deletions

View File

@ -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<OpenTypeFontFile>::lock_instance (face->blob);
const OpenTypeFontFile &ot_file = *CastP<OpenTypeFontFile> (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);

View File

@ -332,10 +332,6 @@ struct Sanitizer
return hb_blob_create_empty ();
}
}
static const Type& lock_instance (hb_blob_t *blob) {
return *CastP<Type> (hb_blob_lock (blob));
}
};

View File

@ -47,13 +47,13 @@ _hb_ot_layout_init (hb_face_t *face)
memset (layout, 0, sizeof (*layout));
layout->gdef_blob = Sanitizer<GDEF>::sanitize (hb_face_get_table (face, HB_OT_TAG_GDEF));
layout->gdef = &Sanitizer<GDEF>::lock_instance (layout->gdef_blob);
layout->gdef = CastP<GDEF> (hb_blob_lock (layout->gdef_blob));
layout->gsub_blob = Sanitizer<GSUB>::sanitize (hb_face_get_table (face, HB_OT_TAG_GSUB));
layout->gsub = &Sanitizer<GSUB>::lock_instance (layout->gsub_blob);
layout->gsub = CastP<GSUB> (hb_blob_lock (layout->gsub_blob));
layout->gpos_blob = Sanitizer<GPOS>::sanitize (hb_face_get_table (face, HB_OT_TAG_GPOS));
layout->gpos = &Sanitizer<GPOS>::lock_instance (layout->gpos_blob);
layout->gpos = CastP<GPOS> (hb_blob_lock (layout->gpos_blob));
}
void