From 236d080d9fae5407d08f5ddcefeb14ba039f787a Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 24 Feb 2026 20:23:10 -0300 Subject: [PATCH] [vector] Drop linear ' *buf, return true; } -static inline bool -hb_svg_buffer_contains (const hb_vector_t &buf, const char *needle) -{ - unsigned nlen = (unsigned) strlen (needle); - if (!nlen || buf.length < nlen) - return false; - - for (unsigned i = 0; i + nlen <= buf.length; i++) - if (buf.arrayZ[i] == needle[0] && - !memcmp (buf.arrayZ + i, needle, nlen)) - return true; - return false; -} - struct hb_svg_blob_meta_t { char *data; @@ -1755,8 +1741,7 @@ hb_vector_paint_glyph (hb_vector_paint_t *paint, } paint->captured_scratch = paint->group_stack.pop (); - has_svg_image = paint->current_color_glyph_has_svg_image || - hb_svg_buffer_contains (paint->captured_scratch, "current_color_glyph_has_svg_image; if (unlikely (!paint->captured_scratch.length)) return false;