[sanitize] Fix previous commit

This commit is contained in:
Behdad Esfahbod 2019-05-10 22:44:19 -07:00
parent 4dcf65328f
commit 9bfe22af61
1 changed files with 4 additions and 4 deletions

View File

@ -445,7 +445,7 @@ struct UnsizedArrayOf
{ {
TRACE_SANITIZE (this); TRACE_SANITIZE (this);
if (unlikely (!sanitize_shallow (c, count))) return_trace (false); if (unlikely (!sanitize_shallow (c, count))) return_trace (false);
if (hb_is_trivially_copyable (Type)) return_trace (true); if (!sizeof... (Ts) && hb_is_trivially_copyable (Type)) return_trace (true);
for (unsigned int i = 0; i < count; i++) for (unsigned int i = 0; i < count; i++)
if (unlikely (!c->dispatch (arrayZ[i], hb_forward<Ts> (ds)...))) if (unlikely (!c->dispatch (arrayZ[i], hb_forward<Ts> (ds)...)))
return_trace (false); return_trace (false);
@ -605,7 +605,7 @@ struct ArrayOf
{ {
TRACE_SANITIZE (this); TRACE_SANITIZE (this);
if (unlikely (!sanitize_shallow (c))) return_trace (false); if (unlikely (!sanitize_shallow (c))) return_trace (false);
if (hb_is_trivially_copyable (Type)) return_trace (true); if (!sizeof... (Ts) && hb_is_trivially_copyable (Type)) return_trace (true);
unsigned int count = len; unsigned int count = len;
for (unsigned int i = 0; i < count; i++) for (unsigned int i = 0; i < count; i++)
if (unlikely (!c->dispatch (arrayZ[i], hb_forward<Ts> (ds)...))) if (unlikely (!c->dispatch (arrayZ[i], hb_forward<Ts> (ds)...)))
@ -723,7 +723,7 @@ struct HeadlessArrayOf
{ {
TRACE_SANITIZE (this); TRACE_SANITIZE (this);
if (unlikely (!sanitize_shallow (c))) return_trace (false); if (unlikely (!sanitize_shallow (c))) return_trace (false);
if (hb_is_trivially_copyable (Type)) return_trace (true); if (!sizeof... (Ts) && hb_is_trivially_copyable (Type)) return_trace (true);
unsigned int count = lenP1 ? lenP1 - 1 : 0; unsigned int count = lenP1 ? lenP1 - 1 : 0;
for (unsigned int i = 0; i < count; i++) for (unsigned int i = 0; i < count; i++)
if (unlikely (!c->dispatch (arrayZ[i], hb_forward<Ts> (ds)...))) if (unlikely (!c->dispatch (arrayZ[i], hb_forward<Ts> (ds)...)))
@ -954,7 +954,7 @@ struct VarSizedBinSearchArrayOf
{ {
TRACE_SANITIZE (this); TRACE_SANITIZE (this);
if (unlikely (!sanitize_shallow (c))) return_trace (false); if (unlikely (!sanitize_shallow (c))) return_trace (false);
if (hb_is_trivially_copyable (Type)) return_trace (true); if (!sizeof... (Ts) && hb_is_trivially_copyable (Type)) return_trace (true);
unsigned int count = get_length (); unsigned int count = get_length ();
for (unsigned int i = 0; i < count; i++) for (unsigned int i = 0; i < count; i++)
if (unlikely (!(*this)[i].sanitize (c, hb_forward<Ts> (ds)...))) if (unlikely (!(*this)[i].sanitize (c, hb_forward<Ts> (ds)...)))