[set] Document & use open-ended del_range()
diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh
index 26cc2a4..b3f9535 100644
--- a/src/hb-ot-layout-common.hh
+++ b/src/hb-ot-layout-common.hh
@@ -2792,7 +2792,7 @@
     hb_set_t region_indices;
     for (unsigned int i = 0; i < inner_maps.length; i++)
       (src+src->dataSets[i]).collect_region_refs (region_indices, inner_maps[i]);
-    region_indices.del_range ((src_regions).regionCount, region_indices.get_max ());
+    region_indices.del_range ((src_regions).regionCount, hb_set_t::INVALID);
 
     /* TODO use constructor when our data-structures support that. */
     hb_inc_bimap_t region_map;
diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh
index c17bf92..f1c111a 100644
--- a/src/hb-ot-layout-gsubgpos.hh
+++ b/src/hb-ot-layout-gsubgpos.hh
@@ -183,7 +183,7 @@
 
   void flush ()
   {
-    hb_set_del_range (output, face->get_num_glyphs (), hb_set_get_max (output));	/* Remove invalid glyphs. */
+    hb_set_del_range (output, face->get_num_glyphs (), HB_SET_VALUE_INVALID);	/* Remove invalid glyphs. */
     hb_set_union (glyphs, output);
     hb_set_clear (output);
     active_glyphs_stack.pop ();
diff --git a/src/hb-set.cc b/src/hb-set.cc
index 9efb76a..25f29c6 100644
--- a/src/hb-set.cc
+++ b/src/hb-set.cc
@@ -301,6 +301,9 @@
  * Removes all of the elements from @first to @last
  * (inclusive) from @set.
  *
+ * If @last is #HB_SET_VALUE_INVALID, then all values
+ * greater than or equal to @first are removed.
+ *
  * Since: 0.9.7
  **/
 void