From 2995b4465bce52b30de2cb6ba24cc80d8602413d Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 14 Oct 2018 20:37:57 -0700 Subject: [PATCH] [CBDT] Simplify sanitize --- src/hb-ot-color-cbdt-table.hh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/hb-ot-color-cbdt-table.hh b/src/hb-ot-color-cbdt-table.hh index 561c59900..01e0f9da4 100644 --- a/src/hb-ot-color-cbdt-table.hh +++ b/src/hb-ot-color-cbdt-table.hh @@ -241,12 +241,7 @@ struct IndexSubtableArray inline bool sanitize (hb_sanitize_context_t *c, unsigned int count) const { TRACE_SANITIZE (this); - if (unlikely (!c->check_array (indexSubtablesZ.arrayZ, count))) - return_trace (false); - for (unsigned int i = 0; i < count; i++) - if (unlikely (!indexSubtablesZ[i].sanitize (c, this))) - return_trace (false); - return_trace (true); + return_trace (indexSubtablesZ.sanitize (c, count, this)); } public: