Use static constexpr for large class constants
authorBehdad Esfahbod <behdad@behdad.org>
Mon, 21 Jan 2019 00:47:52 +0000 (19:47 -0500)
committerBehdad Esfahbod <behdad@behdad.org>
Mon, 21 Jan 2019 00:47:52 +0000 (19:47 -0500)
src/hb-map.hh
src/hb-set.hh

index 40c232e..02d5406 100644 (file)
@@ -166,7 +166,7 @@ struct hb_map_t
   hb_codepoint_t operator [] (unsigned int key) const
   { return get (key); }
 
-  static const hb_codepoint_t INVALID = HB_MAP_VALUE_INVALID;
+  static constexpr hb_codepoint_t INVALID = HB_MAP_VALUE_INVALID;
 
   void clear ()
   {
index 86a06fa..81b9064 100644 (file)
@@ -666,7 +666,7 @@ struct hb_set_t
     return INVALID;
   }
 
-  static const hb_codepoint_t INVALID = HB_SET_VALUE_INVALID;
+  static constexpr hb_codepoint_t INVALID = HB_SET_VALUE_INVALID;
 
   /*
    * Iterator implementation.