From 5c4fead734b082e0168e6811bec4bcaa19acc36a Mon Sep 17 00:00:00 2001
From: Behdad Esfahbod <behdad@behdad.org>
Date: Thu, 29 Nov 2018 15:04:34 -0500
Subject: [PATCH] Convert "static const hb_tag_t" constants to enum

---
 src/hb-aat-layout-ankr-table.hh |  2 +-
 src/hb-aat-layout-bsln-table.hh |  2 +-
 src/hb-aat-layout-feat-table.hh |  2 +-
 src/hb-aat-layout-just-table.hh |  2 +-
 src/hb-aat-layout-kerx-table.hh |  2 +-
 src/hb-aat-layout-lcar-table.hh |  2 +-
 src/hb-aat-layout-morx-table.hh |  6 +++---
 src/hb-aat-layout-trak-table.hh |  2 +-
 src/hb-aat-ltag-table.hh        |  2 +-
 src/hb-ot-cmap-table.hh         |  2 +-
 src/hb-ot-color-cbdt-table.hh   |  4 ++--
 src/hb-ot-color-colr-table.hh   |  2 +-
 src/hb-ot-color-cpal-table.hh   |  2 +-
 src/hb-ot-color-sbix-table.hh   |  2 +-
 src/hb-ot-color-svg-table.hh    |  2 +-
 src/hb-ot-glyf-table.hh         |  4 ++--
 src/hb-ot-hdmx-table.hh         |  2 +-
 src/hb-ot-head-table.hh         |  2 +-
 src/hb-ot-hhea-table.hh         |  4 ++--
 src/hb-ot-hmtx-table.hh         | 14 +++++++-------
 src/hb-ot-kern-table.hh         |  6 +++---
 src/hb-ot-layout-base-table.hh  |  2 +-
 src/hb-ot-layout-gdef-table.hh  |  2 +-
 src/hb-ot-layout-gpos-table.hh  |  2 +-
 src/hb-ot-layout-gsub-table.hh  |  2 +-
 src/hb-ot-layout-jstf-table.hh  |  2 +-
 src/hb-ot-math-table.hh         |  2 +-
 src/hb-ot-maxp-table.hh         |  2 +-
 src/hb-ot-name-table.hh         |  2 +-
 src/hb-ot-os2-table.hh          |  2 +-
 src/hb-ot-post-table.hh         |  2 +-
 src/hb-ot-stat-table.hh         |  2 +-
 src/hb-ot-var-avar-table.hh     |  2 +-
 src/hb-ot-var-fvar-table.hh     |  2 +-
 src/hb-ot-var-hvar-table.hh     |  8 ++++----
 src/hb-ot-var-mvar-table.hh     |  2 +-
 src/hb-ot-vorg-table.hh         |  2 +-
 37 files changed, 53 insertions(+), 53 deletions(-)

diff --git a/src/hb-aat-layout-ankr-table.hh b/src/hb-aat-layout-ankr-table.hh
index b793245a0..763bbedde 100644
--- a/src/hb-aat-layout-ankr-table.hh
+++ b/src/hb-aat-layout-ankr-table.hh
@@ -58,7 +58,7 @@ typedef LArrayOf<Anchor> GlyphAnchors;
 
 struct ankr
 {
-  static const hb_tag_t tableTag = HB_AAT_TAG_ankr;
+  enum { tableTag = HB_AAT_TAG_ankr };
 
   inline const Anchor &get_anchor (hb_codepoint_t glyph_id,
 				   unsigned int i,
diff --git a/src/hb-aat-layout-bsln-table.hh b/src/hb-aat-layout-bsln-table.hh
index b86408626..d2ea71d1a 100644
--- a/src/hb-aat-layout-bsln-table.hh
+++ b/src/hb-aat-layout-bsln-table.hh
@@ -116,7 +116,7 @@ struct BaselineTableFormat3Part
 
 struct bsln
 {
-  static const hb_tag_t tableTag = HB_AAT_TAG_bsln;
+  enum { tableTag = HB_AAT_TAG_bsln };
 
   inline bool sanitize (hb_sanitize_context_t *c) const
   {
diff --git a/src/hb-aat-layout-feat-table.hh b/src/hb-aat-layout-feat-table.hh
index 4e63ec8e8..1565d4325 100644
--- a/src/hb-aat-layout-feat-table.hh
+++ b/src/hb-aat-layout-feat-table.hh
@@ -155,7 +155,7 @@ struct FeatureName
 
 struct feat
 {
-  static const hb_tag_t tableTag = HB_AAT_TAG_feat;
+  enum { tableTag = HB_AAT_TAG_feat };
 
   inline bool has_data (void) const { return version.to_int (); }
 
diff --git a/src/hb-aat-layout-just-table.hh b/src/hb-aat-layout-just-table.hh
index 92ca6603e..295205fde 100644
--- a/src/hb-aat-layout-just-table.hh
+++ b/src/hb-aat-layout-just-table.hh
@@ -382,7 +382,7 @@ struct JustificationHeader
 
 struct just
 {
-  static const hb_tag_t tableTag = HB_AAT_TAG_just;
+  enum { tableTag = HB_AAT_TAG_just };
 
   inline bool sanitize (hb_sanitize_context_t *c) const
   {
diff --git a/src/hb-aat-layout-kerx-table.hh b/src/hb-aat-layout-kerx-table.hh
index 9a2351a12..b25feea2d 100644
--- a/src/hb-aat-layout-kerx-table.hh
+++ b/src/hb-aat-layout-kerx-table.hh
@@ -982,7 +982,7 @@ struct kerx : KerxTable<kerx>
 {
   friend struct KerxTable<kerx>;
 
-  static const hb_tag_t tableTag = HB_AAT_TAG_kerx;
+  enum { tableTag = HB_AAT_TAG_kerx };
   enum { minVersion = 2u };
 
   typedef KerxSubTableHeader SubTableHeader;
diff --git a/src/hb-aat-layout-lcar-table.hh b/src/hb-aat-layout-lcar-table.hh
index 40d34f59b..9bfb68492 100644
--- a/src/hb-aat-layout-lcar-table.hh
+++ b/src/hb-aat-layout-lcar-table.hh
@@ -40,7 +40,7 @@ typedef ArrayOf<HBINT16> LigCaretClassEntry;
 
 struct lcar
 {
-  static const hb_tag_t tableTag = HB_AAT_TAG_lcar;
+  enum { tableTag = HB_AAT_TAG_lcar };
 
   inline unsigned int get_lig_carets (hb_font_t      *font,
 				      hb_direction_t  direction,
diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh
index e8a0cdfc9..9b37a713f 100644
--- a/src/hb-aat-layout-morx-table.hh
+++ b/src/hb-aat-layout-morx-table.hh
@@ -1096,7 +1096,7 @@ struct Chain
 template <typename Types>
 struct mortmorx
 {
-  static const hb_tag_t tableTag = HB_AAT_TAG_morx;
+  enum { tableTag = HB_AAT_TAG_morx };
 
   inline bool has_data (void) const { return version != 0; }
 
@@ -1158,11 +1158,11 @@ struct mortmorx
 
 struct morx : mortmorx<ExtendedTypes>
 {
-  static const hb_tag_t tableTag	= HB_AAT_TAG_morx;
+  enum { tableTag = HB_AAT_TAG_morx };
 };
 struct mort : mortmorx<ObsoleteTypes>
 {
-  static const hb_tag_t tableTag	= HB_AAT_TAG_mort;
+  enum { tableTag = HB_AAT_TAG_mort };
 };
 
 
diff --git a/src/hb-aat-layout-trak-table.hh b/src/hb-aat-layout-trak-table.hh
index 5474d1d11..1658e0feb 100644
--- a/src/hb-aat-layout-trak-table.hh
+++ b/src/hb-aat-layout-trak-table.hh
@@ -166,7 +166,7 @@ struct TrackData
 
 struct trak
 {
-  static const hb_tag_t tableTag = HB_AAT_TAG_trak;
+  enum { tableTag = HB_AAT_TAG_trak };
 
   inline bool has_data (void) const { return version.to_int (); }
 
diff --git a/src/hb-aat-ltag-table.hh b/src/hb-aat-ltag-table.hh
index 8a42b3510..c7c4b4614 100644
--- a/src/hb-aat-ltag-table.hh
+++ b/src/hb-aat-ltag-table.hh
@@ -60,7 +60,7 @@ struct FTStringRange
 
 struct ltag
 {
-  static const hb_tag_t tableTag = HB_AAT_TAG_ltag;
+  enum { tableTag = HB_AAT_TAG_ltag };
 
   inline hb_language_t get_language (unsigned int i) const
   {
diff --git a/src/hb-ot-cmap-table.hh b/src/hb-ot-cmap-table.hh
index a2e611c95..7f32fb3b6 100644
--- a/src/hb-ot-cmap-table.hh
+++ b/src/hb-ot-cmap-table.hh
@@ -843,7 +843,7 @@ struct EncodingRecord
 
 struct cmap
 {
-  static const hb_tag_t tableTag	= HB_OT_TAG_cmap;
+  enum { tableTag = HB_OT_TAG_cmap };
 
   struct subset_plan
   {
diff --git a/src/hb-ot-color-cbdt-table.hh b/src/hb-ot-color-cbdt-table.hh
index 47774fd8f..2b49f2c66 100644
--- a/src/hb-ot-color-cbdt-table.hh
+++ b/src/hb-ot-color-cbdt-table.hh
@@ -332,7 +332,7 @@ struct CBLC
 {
   friend struct CBDT;
 
-  static const hb_tag_t tableTag = HB_OT_TAG_CBLC;
+  enum { tableTag = HB_OT_TAG_CBLC };
 
   inline bool sanitize (hb_sanitize_context_t *c) const
   {
@@ -378,7 +378,7 @@ struct CBLC
 
 struct CBDT
 {
-  static const hb_tag_t tableTag = HB_OT_TAG_CBDT;
+  enum { tableTag = HB_OT_TAG_CBDT };
 
   struct accelerator_t
   {
diff --git a/src/hb-ot-color-colr-table.hh b/src/hb-ot-color-colr-table.hh
index 84c343325..fd73255a2 100644
--- a/src/hb-ot-color-colr-table.hh
+++ b/src/hb-ot-color-colr-table.hh
@@ -87,7 +87,7 @@ struct BaseGlyphRecord
 
 struct COLR
 {
-  static const hb_tag_t tableTag = HB_OT_TAG_COLR;
+  enum { tableTag = HB_OT_TAG_COLR };
 
   inline bool has_data (void) const { return numBaseGlyphs; }
 
diff --git a/src/hb-ot-color-cpal-table.hh b/src/hb-ot-color-cpal-table.hh
index 332f0dd74..095f96f2c 100644
--- a/src/hb-ot-color-cpal-table.hh
+++ b/src/hb-ot-color-cpal-table.hh
@@ -110,7 +110,7 @@ typedef HBUINT32 BGRAColor;
 
 struct CPAL
 {
-  static const hb_tag_t tableTag = HB_OT_TAG_CPAL;
+  enum { tableTag = HB_OT_TAG_CPAL };
 
   inline bool has_data (void) const { return numPalettes; }
 
diff --git a/src/hb-ot-color-sbix-table.hh b/src/hb-ot-color-sbix-table.hh
index 08dee2a0c..2d24fba28 100644
--- a/src/hb-ot-color-sbix-table.hh
+++ b/src/hb-ot-color-sbix-table.hh
@@ -130,7 +130,7 @@ struct SBIXStrike
 
 struct sbix
 {
-  static const hb_tag_t tableTag = HB_OT_TAG_sbix;
+  enum { tableTag = HB_OT_TAG_sbix };
 
   inline bool has_data (void) const { return version; }
 
diff --git a/src/hb-ot-color-svg-table.hh b/src/hb-ot-color-svg-table.hh
index ad3551035..0b8ec1a97 100644
--- a/src/hb-ot-color-svg-table.hh
+++ b/src/hb-ot-color-svg-table.hh
@@ -73,7 +73,7 @@ struct SVGDocumentIndexEntry
 
 struct SVG
 {
-  static const hb_tag_t tableTag = HB_OT_TAG_SVG;
+  enum { tableTag = HB_OT_TAG_SVG };
 
   inline bool has_data (void) const { return svgDocEntries; }
 
diff --git a/src/hb-ot-glyf-table.hh b/src/hb-ot-glyf-table.hh
index c88f43385..23d16a790 100644
--- a/src/hb-ot-glyf-table.hh
+++ b/src/hb-ot-glyf-table.hh
@@ -45,7 +45,7 @@ struct loca
 {
   friend struct glyf;
 
-  static const hb_tag_t tableTag = HB_OT_TAG_loca;
+  enum { tableTag = HB_OT_TAG_loca };
 
   inline bool sanitize (hb_sanitize_context_t *c HB_UNUSED) const
   {
@@ -71,7 +71,7 @@ struct loca
 
 struct glyf
 {
-  static const hb_tag_t tableTag = HB_OT_TAG_glyf;
+  enum { tableTag = HB_OT_TAG_glyf };
 
   inline bool sanitize (hb_sanitize_context_t *c HB_UNUSED) const
   {
diff --git a/src/hb-ot-hdmx-table.hh b/src/hb-ot-hdmx-table.hh
index 0fea24bca..6545f2615 100644
--- a/src/hb-ot-hdmx-table.hh
+++ b/src/hb-ot-hdmx-table.hh
@@ -123,7 +123,7 @@ struct DeviceRecord
 
 struct hdmx
 {
-  static const hb_tag_t tableTag = HB_OT_TAG_hdmx;
+  enum { tableTag = HB_OT_TAG_hdmx };
 
   inline unsigned int get_size (void) const
   {
diff --git a/src/hb-ot-head-table.hh b/src/hb-ot-head-table.hh
index 602e365ce..931ccd40c 100644
--- a/src/hb-ot-head-table.hh
+++ b/src/hb-ot-head-table.hh
@@ -45,7 +45,7 @@ struct head
 {
   friend struct OffsetTable;
 
-  static const hb_tag_t tableTag	= HB_OT_TAG_head;
+  enum { tableTag = HB_OT_TAG_head };
 
   inline unsigned int get_upem (void) const
   {
diff --git a/src/hb-ot-hhea-table.hh b/src/hb-ot-hhea-table.hh
index 3336cadd4..0f47c63d0 100644
--- a/src/hb-ot-hhea-table.hh
+++ b/src/hb-ot-hhea-table.hh
@@ -86,10 +86,10 @@ struct _hea
 };
 
 struct hhea : _hea<hhea> {
-  static const hb_tag_t tableTag	= HB_OT_TAG_hhea;
+  enum { tableTag = HB_OT_TAG_hhea };
 };
 struct vhea : _hea<vhea> {
-  static const hb_tag_t tableTag	= HB_OT_TAG_vhea;
+  enum { tableTag = HB_OT_TAG_vhea };
 };
 
 
diff --git a/src/hb-ot-hmtx-table.hh b/src/hb-ot-hmtx-table.hh
index 091b60117..f22ed1d71 100644
--- a/src/hb-ot-hmtx-table.hh
+++ b/src/hb-ot-hmtx-table.hh
@@ -192,7 +192,7 @@ struct hmtxvmtx
       default_advance = default_advance_ ? default_advance_ : hb_face_get_upem (face);
 
       bool got_font_extents = false;
-      if (T::os2Tag)
+      if (T::os2Tag != HB_TAG_NONE)
       {
 #define USE_TYPO_METRICS (1u<<7)
 	if (0 != (face->table.OS2->fsSelection & USE_TYPO_METRICS))
@@ -327,14 +327,14 @@ struct hmtxvmtx
 };
 
 struct hmtx : hmtxvmtx<hmtx, hhea> {
-  static const hb_tag_t tableTag	= HB_OT_TAG_hmtx;
-  static const hb_tag_t variationsTag	= HB_OT_TAG_HVAR;
-  static const hb_tag_t os2Tag		= HB_OT_TAG_OS2;
+  enum { tableTag = HB_OT_TAG_hmtx };
+  enum { variationsTag = HB_OT_TAG_HVAR };
+  enum { os2Tag = HB_OT_TAG_OS2 };
 };
 struct vmtx : hmtxvmtx<vmtx, vhea> {
-  static const hb_tag_t tableTag	= HB_OT_TAG_vmtx;
-  static const hb_tag_t variationsTag	= HB_OT_TAG_VVAR;
-  static const hb_tag_t os2Tag		= HB_TAG_NONE;
+  enum { tableTag = HB_OT_TAG_vmtx };
+  enum { variationsTag = HB_OT_TAG_VVAR };
+  enum { os2Tag = HB_TAG_NONE };
 };
 
 struct hmtx_accelerator_t : hmtx::accelerator_t {};
diff --git a/src/hb-ot-kern-table.hh b/src/hb-ot-kern-table.hh
index 956bf3f86..e1348b705 100644
--- a/src/hb-ot-kern-table.hh
+++ b/src/hb-ot-kern-table.hh
@@ -197,7 +197,7 @@ struct KernOT : AAT::KerxTable<KernOT>
 {
   friend struct AAT::KerxTable<KernOT>;
 
-  static const hb_tag_t tableTag = HB_OT_TAG_kern;
+  enum { tableTag = HB_OT_TAG_kern };
   enum { minVersion = 0u };
 
   typedef KernOTSubTableHeader SubTableHeader;
@@ -252,7 +252,7 @@ struct KernAAT : AAT::KerxTable<KernAAT>
 {
   friend struct AAT::KerxTable<KernAAT>;
 
-  static const hb_tag_t tableTag = HB_OT_TAG_kern;
+  enum { tableTag = HB_OT_TAG_kern };
   enum { minVersion = 0x00010000u };
 
   typedef KernAATSubTableHeader SubTableHeader;
@@ -269,7 +269,7 @@ struct KernAAT : AAT::KerxTable<KernAAT>
 
 struct kern
 {
-  static const hb_tag_t tableTag = HB_OT_TAG_kern;
+  enum { tableTag = HB_OT_TAG_kern };
 
   inline bool has_data (void) const { return u.version32; }
   inline unsigned int get_type (void) const { return u.major; }
diff --git a/src/hb-ot-layout-base-table.hh b/src/hb-ot-layout-base-table.hh
index fb57e7624..320f00347 100644
--- a/src/hb-ot-layout-base-table.hh
+++ b/src/hb-ot-layout-base-table.hh
@@ -465,7 +465,7 @@ struct Axis
 
 struct BASE
 {
-  static const hb_tag_t tableTag = HB_OT_TAG_BASE;
+  enum { tableTag = HB_OT_TAG_BASE };
 
   inline const Axis &get_axis (hb_direction_t direction) const
   { return HB_DIRECTION_IS_VERTICAL (direction) ? this+vAxis : this+hAxis; }
diff --git a/src/hb-ot-layout-gdef-table.hh b/src/hb-ot-layout-gdef-table.hh
index a0ae27e75..f1052d8f3 100644
--- a/src/hb-ot-layout-gdef-table.hh
+++ b/src/hb-ot-layout-gdef-table.hh
@@ -340,7 +340,7 @@ struct MarkGlyphSets
 
 struct GDEF
 {
-  static const hb_tag_t tableTag	= HB_OT_TAG_GDEF;
+  enum { tableTag = HB_OT_TAG_GDEF };
 
   enum GlyphClasses {
     UnclassifiedGlyph	= 0,
diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh
index 2589218de..32ed13c0d 100644
--- a/src/hb-ot-layout-gpos-table.hh
+++ b/src/hb-ot-layout-gpos-table.hh
@@ -1628,7 +1628,7 @@ struct PosLookup : Lookup
 
 struct GPOS : GSUBGPOS
 {
-  static const hb_tag_t tableTag	= HB_OT_TAG_GPOS;
+  enum { tableTag = HB_OT_TAG_GPOS };
 
   inline const PosLookup& get_lookup (unsigned int i) const
   { return CastR<PosLookup> (GSUBGPOS::get_lookup (i)); }
diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh
index 27bd440da..6acdcf2f0 100644
--- a/src/hb-ot-layout-gsub-table.hh
+++ b/src/hb-ot-layout-gsub-table.hh
@@ -1475,7 +1475,7 @@ struct SubstLookup : Lookup
 
 struct GSUB : GSUBGPOS
 {
-  static const hb_tag_t tableTag	= HB_OT_TAG_GSUB;
+  enum { tableTag = HB_OT_TAG_GSUB };
 
   inline const SubstLookup& get_lookup (unsigned int i) const
   { return CastR<SubstLookup> (GSUBGPOS::get_lookup (i)); }
diff --git a/src/hb-ot-layout-jstf-table.hh b/src/hb-ot-layout-jstf-table.hh
index 2fb23cbc3..d05f813fb 100644
--- a/src/hb-ot-layout-jstf-table.hh
+++ b/src/hb-ot-layout-jstf-table.hh
@@ -195,7 +195,7 @@ struct JstfScript
 
 struct JSTF
 {
-  static const hb_tag_t tableTag	= HB_OT_TAG_JSTF;
+  enum { tableTag = HB_OT_TAG_JSTF };
 
   inline unsigned int get_script_count (void) const
   { return scriptList.len; }
diff --git a/src/hb-ot-math-table.hh b/src/hb-ot-math-table.hh
index 153a41795..e100991cd 100644
--- a/src/hb-ot-math-table.hh
+++ b/src/hb-ot-math-table.hh
@@ -680,7 +680,7 @@ struct MathVariants
 
 struct MATH
 {
-  static const hb_tag_t tableTag	= HB_OT_TAG_MATH;
+  enum { tableTag = HB_OT_TAG_MATH };
 
   inline bool has_data (void) const { return version.to_int (); }
 
diff --git a/src/hb-ot-maxp-table.hh b/src/hb-ot-maxp-table.hh
index 198dd2518..885685d64 100644
--- a/src/hb-ot-maxp-table.hh
+++ b/src/hb-ot-maxp-table.hh
@@ -71,7 +71,7 @@ struct maxpV1Tail
 
 struct maxp
 {
-  static const hb_tag_t tableTag = HB_OT_TAG_maxp;
+  enum { tableTag = HB_OT_TAG_maxp };
 
   inline unsigned int get_num_glyphs (void) const
   {
diff --git a/src/hb-ot-name-table.hh b/src/hb-ot-name-table.hh
index ab07b7196..4f24d7372 100644
--- a/src/hb-ot-name-table.hh
+++ b/src/hb-ot-name-table.hh
@@ -151,7 +151,7 @@ _hb_ot_name_entry_cmp (const void *pa, const void *pb)
 
 struct name
 {
-  static const hb_tag_t tableTag	= HB_OT_TAG_name;
+  enum { tableTag = HB_OT_TAG_name };
 
   inline unsigned int get_size (void) const
   { return min_size + count * nameRecordZ[0].min_size; }
diff --git a/src/hb-ot-os2-table.hh b/src/hb-ot-os2-table.hh
index a5a9c07ea..e53eda731 100644
--- a/src/hb-ot-os2-table.hh
+++ b/src/hb-ot-os2-table.hh
@@ -40,7 +40,7 @@ namespace OT {
 
 struct OS2
 {
-  static const hb_tag_t tableTag = HB_OT_TAG_OS2;
+  enum { tableTag = HB_OT_TAG_OS2 };
 
   inline bool sanitize (hb_sanitize_context_t *c) const
   {
diff --git a/src/hb-ot-post-table.hh b/src/hb-ot-post-table.hh
index 98df3e780..0ca3760b5 100644
--- a/src/hb-ot-post-table.hh
+++ b/src/hb-ot-post-table.hh
@@ -71,7 +71,7 @@ struct postV2Tail
 
 struct post
 {
-  static const hb_tag_t tableTag = HB_OT_TAG_post;
+  enum { tableTag = HB_OT_TAG_post };
 
   inline bool subset (hb_subset_plan_t *plan) const
   {
diff --git a/src/hb-ot-stat-table.hh b/src/hb-ot-stat-table.hh
index 02c376e5d..7ad45db20 100644
--- a/src/hb-ot-stat-table.hh
+++ b/src/hb-ot-stat-table.hh
@@ -225,7 +225,7 @@ struct AxisValue
 
 struct STAT
 {
-  static const hb_tag_t tableTag = HB_OT_TAG_STAT;
+  enum { tableTag = HB_OT_TAG_STAT };
 
   inline bool sanitize (hb_sanitize_context_t *c) const
   {
diff --git a/src/hb-ot-var-avar-table.hh b/src/hb-ot-var-avar-table.hh
index c2b110a21..70feb1243 100644
--- a/src/hb-ot-var-avar-table.hh
+++ b/src/hb-ot-var-avar-table.hh
@@ -99,7 +99,7 @@ struct SegmentMaps : ArrayOf<AxisValueMap>
 
 struct avar
 {
-  static const hb_tag_t tableTag	= HB_OT_TAG_avar;
+  enum { tableTag = HB_OT_TAG_avar };
 
   inline bool sanitize (hb_sanitize_context_t *c) const
   {
diff --git a/src/hb-ot-var-fvar-table.hh b/src/hb-ot-var-fvar-table.hh
index fed334e8a..975dae923 100644
--- a/src/hb-ot-var-fvar-table.hh
+++ b/src/hb-ot-var-fvar-table.hh
@@ -96,7 +96,7 @@ struct AxisRecord
 
 struct fvar
 {
-  static const hb_tag_t tableTag	= HB_OT_TAG_fvar;
+  enum { tableTag = HB_OT_TAG_fvar };
 
   inline bool has_data (void) const { return version.to_int (); }
 
diff --git a/src/hb-ot-var-hvar-table.hh b/src/hb-ot-var-hvar-table.hh
index 62a6547b5..a60e35b9c 100644
--- a/src/hb-ot-var-hvar-table.hh
+++ b/src/hb-ot-var-hvar-table.hh
@@ -102,8 +102,8 @@ struct DeltaSetIndexMap
 
 struct HVARVVAR
 {
-  static const hb_tag_t HVARTag	= HB_OT_TAG_HVAR;
-  static const hb_tag_t VVARTag	= HB_OT_TAG_VVAR;
+  enum { HVARTag = HB_OT_TAG_HVAR };
+  enum { VVARTag = HB_OT_TAG_VVAR };
 
   inline bool sanitize (hb_sanitize_context_t *c) const
   {
@@ -143,10 +143,10 @@ struct HVARVVAR
 };
 
 struct HVAR : HVARVVAR {
-  static const hb_tag_t tableTag	= HB_OT_TAG_HVAR;
+  enum { tableTag = HB_OT_TAG_HVAR };
 };
 struct VVAR : HVARVVAR {
-  static const hb_tag_t tableTag	= HB_OT_TAG_VVAR;
+  enum { tableTag = HB_OT_TAG_VVAR };
 
   inline bool sanitize (hb_sanitize_context_t *c) const
   {
diff --git a/src/hb-ot-var-mvar-table.hh b/src/hb-ot-var-mvar-table.hh
index b16a09b3d..23d2649b0 100644
--- a/src/hb-ot-var-mvar-table.hh
+++ b/src/hb-ot-var-mvar-table.hh
@@ -58,7 +58,7 @@ struct VariationValueRecord
 
 struct MVAR
 {
-  static const hb_tag_t tableTag	= HB_OT_TAG_MVAR;
+  enum { tableTag = HB_OT_TAG_MVAR };
 
   inline bool sanitize (hb_sanitize_context_t *c) const
   {
diff --git a/src/hb-ot-vorg-table.hh b/src/hb-ot-vorg-table.hh
index a0480cbcb..f724fe04e 100644
--- a/src/hb-ot-vorg-table.hh
+++ b/src/hb-ot-vorg-table.hh
@@ -57,7 +57,7 @@ struct VertOriginMetric
 
 struct VORG
 {
-  static const hb_tag_t tableTag = HB_OT_TAG_VORG;
+  enum { tableTag = HB_OT_TAG_VORG };
 
   inline bool has_data (void) const { return version.to_int (); }