Remove a couple unnecessary barriers

pull/4487/head
Behdad Esfahbod 1 year ago
parent d10cc79a6c
commit f31fb43155
  1. 6
      src/hb-ot-os2-table.hh
  2. 2
      src/hb-ot-post-table.hh

@ -336,9 +336,9 @@ struct OS2
TRACE_SANITIZE (this);
if (unlikely (!c->check_struct (this))) return_trace (false);
hb_barrier ();
if (unlikely (version >= 1 && hb_barrier () && !v1X.sanitize (c))) return_trace (false);
if (unlikely (version >= 2 && hb_barrier () && !v2X.sanitize (c))) return_trace (false);
if (unlikely (version >= 5 && hb_barrier () && !v5X.sanitize (c))) return_trace (false);
if (unlikely (version >= 1 && !v1X.sanitize (c))) return_trace (false);
if (unlikely (version >= 2 && !v2X.sanitize (c))) return_trace (false);
if (unlikely (version >= 5 && !v5X.sanitize (c))) return_trace (false);
return_trace (true);
}

@ -301,7 +301,7 @@ struct post
return_trace (c->check_struct (this) &&
hb_barrier () &&
(version.to_int () == 0x00010000 ||
(version.to_int () == 0x00020000 && hb_barrier () && v2X.sanitize (c)) ||
(version.to_int () == 0x00020000 && v2X.sanitize (c)) ||
version.to_int () == 0x00030000));
}

Loading…
Cancel
Save