diff --git a/src/hb-cache.hh b/src/hb-cache.hh index 3bcfc9e3d..e29984d93 100644 --- a/src/hb-cache.hh +++ b/src/hb-cache.hh @@ -38,12 +38,12 @@ template struct hb_cache_t { - static_assert ((key_bits >= cache_bits), ""); - static_assert ((key_bits + value_bits - cache_bits <= 8 * sizeof (hb_atomic_int_t)), ""); - static_assert (sizeof (hb_atomic_int_t) == sizeof (unsigned int), ""); - using item_t = typename std::conditional::type; + static_assert ((key_bits >= cache_bits), ""); + static_assert ((key_bits + value_bits - cache_bits <= 8 * sizeof (item_t)), ""); + static_assert (sizeof (item_t) == sizeof (unsigned int), ""); + void init () { clear (); } void fini () {} @@ -57,7 +57,7 @@ struct hb_cache_t { unsigned int k = key & ((1u<> value_bits) != (key >> cache_bits)) return false; *value = v & ((1u<