return_trace (out);
}
- bool sanitize (hb_sanitize_context_t *c, unsigned int count) const
- {
- TRACE_SANITIZE (this);
- if (unlikely (!sanitize_shallow (c, count))) return_trace (false);
-
- static_assert ((hb_void_t<decltype (hb_declval (Type).sanitize (c))> (), true), "");
- static_assert (hb_is_trivially_copyable (Type), "");
-
- return_trace (true);
- }
template <typename ...Ts>
bool sanitize (hb_sanitize_context_t *c, unsigned int count, Ts&&... ds) const
{
TRACE_SANITIZE (this);
if (unlikely (!sanitize_shallow (c, count))) return_trace (false);
+ if (hb_is_trivially_copyable (Type)) return_trace (true);
for (unsigned int i = 0; i < count; i++)
if (unlikely (!c->dispatch (arrayZ[i], hb_forward<Ts> (ds)...)))
return_trace (false);
return_trace (out);
}
- bool sanitize (hb_sanitize_context_t *c) const
- {
- TRACE_SANITIZE (this);
- if (unlikely (!sanitize_shallow (c))) return_trace (false);
-
- static_assert ((hb_void_t<decltype (hb_declval (Type).sanitize (c))> (), true), "");
- static_assert (hb_is_trivially_copyable (Type), "");
-
- return_trace (true);
- }
template <typename ...Ts>
bool sanitize (hb_sanitize_context_t *c, Ts&&... ds) const
{
TRACE_SANITIZE (this);
if (unlikely (!sanitize_shallow (c))) return_trace (false);
+ if (hb_is_trivially_copyable (Type)) return_trace (true);
unsigned int count = len;
for (unsigned int i = 0; i < count; i++)
if (unlikely (!c->dispatch (arrayZ[i], hb_forward<Ts> (ds)...)))
return_trace (true);
}
- bool sanitize (hb_sanitize_context_t *c) const
+ template <typename ...Ts>
+ bool sanitize (hb_sanitize_context_t *c, Ts&&... ds) const
{
TRACE_SANITIZE (this);
if (unlikely (!sanitize_shallow (c))) return_trace (false);
-
- static_assert ((hb_void_t<decltype (hb_declval (Type).sanitize (c))> (), true), "");
- static_assert (hb_is_trivially_copyable (Type), "");
-
+ if (hb_is_trivially_copyable (Type)) return_trace (true);
+ unsigned int count = lenP1 ? lenP1 - 1 : 0;
+ for (unsigned int i = 0; i < count; i++)
+ if (unlikely (!c->dispatch (arrayZ[i], hb_forward<Ts> (ds)...)))
+ return_trace (false);
return_trace (true);
}
unsigned int get_size () const
{ return header.static_size + header.nUnits * header.unitSize; }
- bool sanitize (hb_sanitize_context_t *c) const
- {
- TRACE_SANITIZE (this);
- if (unlikely (!sanitize_shallow (c))) return_trace (false);
-
- static_assert ((hb_void_t<decltype (hb_declval (Type).sanitize (c))> (), true), "");
- static_assert (hb_is_trivially_copyable (Type), "");
-
- return_trace (true);
- }
template <typename ...Ts>
bool sanitize (hb_sanitize_context_t *c, Ts&&... ds) const
{
TRACE_SANITIZE (this);
if (unlikely (!sanitize_shallow (c))) return_trace (false);
+ if (hb_is_trivially_copyable (Type)) return_trace (true);
unsigned int count = get_length ();
for (unsigned int i = 0; i < count; i++)
if (unlikely (!(*this)[i].sanitize (c, hb_forward<Ts> (ds)...)))