提交 9401829d 编写于 作者: B Behdad Esfahbod

Remove Sanitizer<>

上级 8e3e4127
...@@ -362,20 +362,6 @@ struct hb_sanitize_context_t : ...@@ -362,20 +362,6 @@ struct hb_sanitize_context_t :
}; };
/* Template to sanitize an object. */
template <typename Type>
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<Type> (blob); }
private:
hb_sanitize_context_t c[1];
};
/* /*
* Serialize * Serialize
*/ */
...@@ -1285,7 +1271,7 @@ struct hb_table_lazy_loader_t ...@@ -1285,7 +1271,7 @@ struct hb_table_lazy_loader_t
hb_blob_t *b = (hb_blob_t *) hb_atomic_ptr_get (&blob); hb_blob_t *b = (hb_blob_t *) hb_atomic_ptr_get (&blob);
if (unlikely (!b)) if (unlikely (!b))
{ {
b = OT::Sanitizer<T>(face->get_num_glyphs ()).sanitize (face->reference_table (T::tableTag)); b = OT::hb_sanitize_context_t().reference_table<T> (face);
if (!hb_atomic_ptr_cmpexch (&blob, nullptr, b)) if (!hb_atomic_ptr_cmpexch (&blob, nullptr, b))
{ {
hb_blob_destroy (b); hb_blob_destroy (b);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册