[svg] Use SortedArrayOf.bsearch
diff --git a/src/hb-ot-color-svg-table.hh b/src/hb-ot-color-svg-table.hh
index 3e6480c..35a3647 100644
--- a/src/hb-ot-color-svg-table.hh
+++ b/src/hb-ot-color-svg-table.hh
@@ -43,13 +43,6 @@
   inline int cmp (hb_codepoint_t g) const
   { return g < startGlyphID ? -1 : g > endGlyphID ? 1 : 0; }
 
-  static int cmp (const void *pa, const void *pb)
-  {
-    const hb_codepoint_t *a = (const hb_codepoint_t *) pa;
-    const SVGDocumentIndexEntry *b = (const SVGDocumentIndexEntry *) pb;
-    return b->cmp (*a);
-  }
-
   inline hb_blob_t *reference_blob (hb_blob_t *svg_blob, unsigned int index_offset) const
   {
     if (svgDocLength == 0) return hb_blob_get_empty ();
@@ -113,13 +106,8 @@
 
   inline const SVGDocumentIndexEntry &get_glyph_entry (hb_codepoint_t glyph_id) const
   {
-    const SVGDocumentIndexEntry *rec = (SVGDocumentIndexEntry *)
-				       bsearch (&glyph_id,
-						&(this+svgDocEntries).arrayZ,
-						(this+svgDocEntries).len,
-						sizeof (SVGDocumentIndexEntry),
-						SVGDocumentIndexEntry::cmp);
-    return likely (rec) ? *rec : Null(SVGDocumentIndexEntry);
+    const SortedArrayOf<SVGDocumentIndexEntry> docs = this+svgDocEntries;
+    return docs[docs.bsearch (glyph_id)];
   }
 
   inline bool sanitize (hb_sanitize_context_t *c) const
@@ -131,7 +119,7 @@
 
   protected:
   HBUINT16	version;	/* Table version (starting at 0). */
-  LOffsetTo<ArrayOf<SVGDocumentIndexEntry> >
+  LOffsetTo<SortedArrayOf<SVGDocumentIndexEntry> >
 		svgDocEntries;	/* Offset (relative to the start of the SVG table) to the
 				 * SVG Documents Index. Must be non-zero. */
 				/* Array of SVG Document Index Entries. */