Fix build with clang

This commit is contained in:
Behdad Esfahbod 2017-01-11 11:58:13 -08:00
parent 1f810daf16
commit 784d1180de
1 changed files with 2 additions and 2 deletions

View File

@ -1133,11 +1133,11 @@ struct hb_lazy_table_loader_t
inline const T* get (void) const inline const T* get (void) const
{ {
retry: retry:
const T *p = (T *) hb_atomic_ptr_get (&instance); T *p = (T *) hb_atomic_ptr_get (&instance);
if (unlikely (!p)) if (unlikely (!p))
{ {
hb_blob_t *blob_ = OT::Sanitizer<T>::sanitize (face->reference_table (T::tableTag)); hb_blob_t *blob_ = OT::Sanitizer<T>::sanitize (face->reference_table (T::tableTag));
p = OT::Sanitizer<T>::lock_instance (blob_); p = const_cast<T *>(OT::Sanitizer<T>::lock_instance (blob_));
if (!hb_atomic_ptr_cmpexch (const_cast<T **>(&instance), NULL, p)) if (!hb_atomic_ptr_cmpexch (const_cast<T **>(&instance), NULL, p))
{ {
hb_blob_destroy (blob_); hb_blob_destroy (blob_);