[avar2] Minor sanitize rewrite
This commit is contained in:
parent
f94a3ba1db
commit
06c3ec0a19
|
@ -160,12 +160,12 @@ struct avar
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef HB_NO_VARIATIONS2
|
#ifndef HB_NO_VARIATIONS2
|
||||||
if (version.major == 2)
|
if (version.major < 2)
|
||||||
{
|
return_trace (true);
|
||||||
const auto *v2 = (const avarV2Tail *) map;
|
|
||||||
if (unlikely (!v2->sanitize (c, this)))
|
const auto &v2 = * (const avarV2Tail *) map;
|
||||||
return_trace (false);
|
if (unlikely (!v2.sanitize (c, this)))
|
||||||
}
|
return_trace (false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return_trace (true);
|
return_trace (true);
|
||||||
|
@ -186,10 +186,10 @@ struct avar
|
||||||
if (version.major < 2)
|
if (version.major < 2)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const auto *v2 = (const avarV2Tail *) map;
|
const auto &v2 = * (const avarV2Tail *) map;
|
||||||
|
|
||||||
const auto &varidx_map = this+v2->varIdxMap;
|
const auto &varidx_map = this+v2.varIdxMap;
|
||||||
const auto &var_store = this+v2->varStore;
|
const auto &var_store = this+v2.varStore;
|
||||||
auto *var_store_cache = var_store.create_cache ();
|
auto *var_store_cache = var_store.create_cache ();
|
||||||
|
|
||||||
hb_vector_t<int> out;
|
hb_vector_t<int> out;
|
||||||
|
|
Loading…
Reference in New Issue