From ef00654962204ae706b276871e2b6758fbbf69e0 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 22 Jan 2019 12:08:57 +0100 Subject: [PATCH] Convert tag enum class consts to static constexpr Part of https://github.com/harfbuzz/harfbuzz/issues/1553 --- src/hb-aat-fdsc-table.hh | 2 +- 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-cff1-table.hh | 2 +- src/hb-ot-cff2-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-gasp-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 | 12 ++++++------ 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 +- 41 files changed, 56 insertions(+), 56 deletions(-) diff --git a/src/hb-aat-fdsc-table.hh b/src/hb-aat-fdsc-table.hh index a1af595f9..1188e352f 100644 --- a/src/hb-aat-fdsc-table.hh +++ b/src/hb-aat-fdsc-table.hh @@ -74,7 +74,7 @@ struct FontDescriptor struct fdsc { - enum { tableTag = HB_AAT_TAG_fdsc }; + static constexpr hb_tag_t tableTag = HB_AAT_TAG_fdsc; enum { Weight = HB_TAG ('w','g','h','t'), diff --git a/src/hb-aat-layout-ankr-table.hh b/src/hb-aat-layout-ankr-table.hh index f6f12461a..236e4aaf1 100644 --- a/src/hb-aat-layout-ankr-table.hh +++ b/src/hb-aat-layout-ankr-table.hh @@ -58,7 +58,7 @@ typedef LArrayOf GlyphAnchors; struct ankr { - enum { tableTag = HB_AAT_TAG_ankr }; + static constexpr hb_tag_t tableTag = HB_AAT_TAG_ankr; 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 5bc59cbb1..9139d2818 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 { - enum { tableTag = HB_AAT_TAG_bsln }; + static constexpr hb_tag_t tableTag = HB_AAT_TAG_bsln; 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 acc4d04cf..ab23ee056 100644 --- a/src/hb-aat-layout-feat-table.hh +++ b/src/hb-aat-layout-feat-table.hh @@ -154,7 +154,7 @@ struct FeatureName struct feat { - enum { tableTag = HB_AAT_TAG_feat }; + static constexpr hb_tag_t tableTag = HB_AAT_TAG_feat; bool has_data () const { return version.to_int (); } diff --git a/src/hb-aat-layout-just-table.hh b/src/hb-aat-layout-just-table.hh index d39945abd..d53f8f19e 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 { - enum { tableTag = HB_AAT_TAG_just }; + static constexpr hb_tag_t tableTag = HB_AAT_TAG_just; 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 db855f3dd..cbb305bd8 100644 --- a/src/hb-aat-layout-kerx-table.hh +++ b/src/hb-aat-layout-kerx-table.hh @@ -979,7 +979,7 @@ struct kerx : KerxTable { friend struct KerxTable; - enum { tableTag = HB_AAT_TAG_kerx }; + static constexpr hb_tag_t 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 27c601de6..4be799fbc 100644 --- a/src/hb-aat-layout-lcar-table.hh +++ b/src/hb-aat-layout-lcar-table.hh @@ -40,7 +40,7 @@ typedef ArrayOf LigCaretClassEntry; struct lcar { - enum { tableTag = HB_AAT_TAG_lcar }; + static constexpr hb_tag_t tableTag = HB_AAT_TAG_lcar; 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 05b508148..8d927e24a 100644 --- a/src/hb-aat-layout-morx-table.hh +++ b/src/hb-aat-layout-morx-table.hh @@ -1097,7 +1097,7 @@ struct Chain template struct mortmorx { - enum { tableTag = HB_AAT_TAG_morx }; + static constexpr hb_tag_t tableTag = HB_AAT_TAG_morx; bool has_data () const { return version != 0; } @@ -1159,11 +1159,11 @@ struct mortmorx struct morx : mortmorx { - enum { tableTag = HB_AAT_TAG_morx }; + static constexpr hb_tag_t tableTag = HB_AAT_TAG_morx; }; struct mort : mortmorx { - enum { tableTag = HB_AAT_TAG_mort }; + static constexpr hb_tag_t tableTag = HB_AAT_TAG_mort; }; diff --git a/src/hb-aat-layout-trak-table.hh b/src/hb-aat-layout-trak-table.hh index 3fe7d439e..0c8e4558f 100644 --- a/src/hb-aat-layout-trak-table.hh +++ b/src/hb-aat-layout-trak-table.hh @@ -160,7 +160,7 @@ struct TrackData struct trak { - enum { tableTag = HB_AAT_TAG_trak }; + static constexpr hb_tag_t tableTag = HB_AAT_TAG_trak; bool has_data () const { return version.to_int (); } diff --git a/src/hb-aat-ltag-table.hh b/src/hb-aat-ltag-table.hh index 9a6a280da..6f34a0095 100644 --- a/src/hb-aat-ltag-table.hh +++ b/src/hb-aat-ltag-table.hh @@ -60,7 +60,7 @@ struct FTStringRange struct ltag { - enum { tableTag = HB_AAT_TAG_ltag }; + static constexpr hb_tag_t tableTag = HB_AAT_TAG_ltag; hb_language_t get_language (unsigned int i) const { diff --git a/src/hb-ot-cff1-table.hh b/src/hb-ot-cff1-table.hh index 073dd7ea9..1effdf006 100644 --- a/src/hb-ot-cff1-table.hh +++ b/src/hb-ot-cff1-table.hh @@ -984,7 +984,7 @@ using namespace CFF; struct cff1 { - enum { tableTag = HB_OT_TAG_cff1 }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_cff1; bool sanitize (hb_sanitize_context_t *c) const { diff --git a/src/hb-ot-cff2-table.hh b/src/hb-ot-cff2-table.hh index cd3786302..a7b0ba9be 100644 --- a/src/hb-ot-cff2-table.hh +++ b/src/hb-ot-cff2-table.hh @@ -408,7 +408,7 @@ using namespace CFF; struct cff2 { - enum { tableTag = HB_OT_TAG_cff2 }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_cff2; bool sanitize (hb_sanitize_context_t *c) const { diff --git a/src/hb-ot-cmap-table.hh b/src/hb-ot-cmap-table.hh index 802231a8c..f62d998a5 100644 --- a/src/hb-ot-cmap-table.hh +++ b/src/hb-ot-cmap-table.hh @@ -841,7 +841,7 @@ struct EncodingRecord struct cmap { - enum { tableTag = HB_OT_TAG_cmap }; + static constexpr hb_tag_t 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 939aeb1da..71c31aff8 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; - enum { tableTag = HB_OT_TAG_CBLC }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_CBLC; bool sanitize (hb_sanitize_context_t *c) const { @@ -378,7 +378,7 @@ struct CBLC struct CBDT { - enum { tableTag = HB_OT_TAG_CBDT }; + static constexpr hb_tag_t 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 cdb986a8e..a57911ad0 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 { - enum { tableTag = HB_OT_TAG_COLR }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_COLR; bool has_data () const { return numBaseGlyphs; } diff --git a/src/hb-ot-color-cpal-table.hh b/src/hb-ot-color-cpal-table.hh index 81451d32c..407049350 100644 --- a/src/hb-ot-color-cpal-table.hh +++ b/src/hb-ot-color-cpal-table.hh @@ -107,7 +107,7 @@ typedef HBUINT32 BGRAColor; struct CPAL { - enum { tableTag = HB_OT_TAG_CPAL }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_CPAL; bool has_data () const { return numPalettes; } diff --git a/src/hb-ot-color-sbix-table.hh b/src/hb-ot-color-sbix-table.hh index ed93d6526..f6bdbb3dd 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 { - enum { tableTag = HB_OT_TAG_sbix }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_sbix; bool has_data () const { return version; } diff --git a/src/hb-ot-color-svg-table.hh b/src/hb-ot-color-svg-table.hh index 46f20d76f..6e8eddf24 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 { - enum { tableTag = HB_OT_TAG_SVG }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_SVG; bool has_data () const { return svgDocEntries; } diff --git a/src/hb-ot-gasp-table.hh b/src/hb-ot-gasp-table.hh index d328fd222..94fff58a1 100644 --- a/src/hb-ot-gasp-table.hh +++ b/src/hb-ot-gasp-table.hh @@ -57,7 +57,7 @@ struct GaspRange struct gasp { - enum { tableTag = HB_OT_TAG_gasp }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_gasp; const GaspRange &get_gasp_range (unsigned int i) const { return gaspRanges[i]; } diff --git a/src/hb-ot-glyf-table.hh b/src/hb-ot-glyf-table.hh index f568cf0cd..c2b38b05b 100644 --- a/src/hb-ot-glyf-table.hh +++ b/src/hb-ot-glyf-table.hh @@ -45,7 +45,7 @@ struct loca { friend struct glyf; - enum { tableTag = HB_OT_TAG_loca }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_loca; bool sanitize (hb_sanitize_context_t *c HB_UNUSED) const { @@ -71,7 +71,7 @@ struct loca struct glyf { - enum { tableTag = HB_OT_TAG_glyf }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_glyf; 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 02ae8d898..95229c523 100644 --- a/src/hb-ot-hdmx-table.hh +++ b/src/hb-ot-hdmx-table.hh @@ -119,7 +119,7 @@ struct DeviceRecord struct hdmx { - enum { tableTag = HB_OT_TAG_hdmx }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_hdmx; unsigned int get_size () const { return min_size + numRecords * sizeDeviceRecord; } diff --git a/src/hb-ot-head-table.hh b/src/hb-ot-head-table.hh index 41062ca32..3c0bb3d6d 100644 --- a/src/hb-ot-head-table.hh +++ b/src/hb-ot-head-table.hh @@ -45,7 +45,7 @@ struct head { friend struct OffsetTable; - enum { tableTag = HB_OT_TAG_head }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_head; unsigned int get_upem () const { diff --git a/src/hb-ot-hhea-table.hh b/src/hb-ot-hhea-table.hh index 7bc1817ee..c3155b79e 100644 --- a/src/hb-ot-hhea-table.hh +++ b/src/hb-ot-hhea-table.hh @@ -86,10 +86,10 @@ struct _hea }; struct hhea : _hea { - enum { tableTag = HB_OT_TAG_hhea }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_hhea; }; struct vhea : _hea { - enum { tableTag = HB_OT_TAG_vhea }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_vhea; }; diff --git a/src/hb-ot-hmtx-table.hh b/src/hb-ot-hmtx-table.hh index 0a16678ae..a95a56f32 100644 --- a/src/hb-ot-hmtx-table.hh +++ b/src/hb-ot-hmtx-table.hh @@ -323,14 +323,14 @@ struct hmtxvmtx }; struct hmtx : hmtxvmtx { - enum { tableTag = HB_OT_TAG_hmtx }; - enum { variationsTag = HB_OT_TAG_HVAR }; - enum { os2Tag = HB_OT_TAG_OS2 }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_hmtx; + static constexpr hb_tag_t variationsTag = HB_OT_TAG_HVAR; + static constexpr hb_tag_t os2Tag = HB_OT_TAG_OS2; }; struct vmtx : hmtxvmtx { - enum { tableTag = HB_OT_TAG_vmtx }; - enum { variationsTag = HB_OT_TAG_VVAR }; - enum { os2Tag = HB_TAG_NONE }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_vmtx; + static constexpr hb_tag_t variationsTag = HB_OT_TAG_VVAR; + static constexpr hb_tag_t 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 19d321e56..bb563bf50 100644 --- a/src/hb-ot-kern-table.hh +++ b/src/hb-ot-kern-table.hh @@ -197,7 +197,7 @@ struct KernOT : AAT::KerxTable { friend struct AAT::KerxTable; - enum { tableTag = HB_OT_TAG_kern }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_kern; enum { minVersion = 0u }; typedef KernOTSubTableHeader SubTableHeader; @@ -252,7 +252,7 @@ struct KernAAT : AAT::KerxTable { friend struct AAT::KerxTable; - enum { tableTag = HB_OT_TAG_kern }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_kern; enum { minVersion = 0x00010000u }; typedef KernAATSubTableHeader SubTableHeader; @@ -269,7 +269,7 @@ struct KernAAT : AAT::KerxTable struct kern { - enum { tableTag = HB_OT_TAG_kern }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_kern; bool has_data () const { return u.version32; } unsigned int get_type () const { return u.major; } diff --git a/src/hb-ot-layout-base-table.hh b/src/hb-ot-layout-base-table.hh index 6c3993267..dd0fba1ff 100644 --- a/src/hb-ot-layout-base-table.hh +++ b/src/hb-ot-layout-base-table.hh @@ -464,7 +464,7 @@ struct Axis struct BASE { - enum { tableTag = HB_OT_TAG_BASE }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_BASE; 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 58be094aa..06c26fbb4 100644 --- a/src/hb-ot-layout-gdef-table.hh +++ b/src/hb-ot-layout-gdef-table.hh @@ -341,7 +341,7 @@ struct MarkGlyphSets struct GDEF { - enum { tableTag = HB_OT_TAG_GDEF }; + static constexpr hb_tag_t 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 0b7b11088..e17a28241 100644 --- a/src/hb-ot-layout-gpos-table.hh +++ b/src/hb-ot-layout-gpos-table.hh @@ -1601,7 +1601,7 @@ struct PosLookup : Lookup struct GPOS : GSUBGPOS { - enum { tableTag = HB_OT_TAG_GPOS }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_GPOS; const PosLookup& get_lookup (unsigned int i) const { return CastR (GSUBGPOS::get_lookup (i)); } diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh index 39b7cf225..33b8f0ebd 100644 --- a/src/hb-ot-layout-gsub-table.hh +++ b/src/hb-ot-layout-gsub-table.hh @@ -1410,7 +1410,7 @@ struct SubstLookup : Lookup struct GSUB : GSUBGPOS { - enum { tableTag = HB_OT_TAG_GSUB }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_GSUB; const SubstLookup& get_lookup (unsigned int i) const { return CastR (GSUBGPOS::get_lookup (i)); } diff --git a/src/hb-ot-layout-jstf-table.hh b/src/hb-ot-layout-jstf-table.hh index 3beedc49b..1dd31d5b0 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 { - enum { tableTag = HB_OT_TAG_JSTF }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_JSTF; unsigned int get_script_count () const { return scriptList.len; } diff --git a/src/hb-ot-math-table.hh b/src/hb-ot-math-table.hh index ae0016f57..62bf072e9 100644 --- a/src/hb-ot-math-table.hh +++ b/src/hb-ot-math-table.hh @@ -679,7 +679,7 @@ struct MathVariants struct MATH { - enum { tableTag = HB_OT_TAG_MATH }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_MATH; bool has_data () const { return version.to_int (); } diff --git a/src/hb-ot-maxp-table.hh b/src/hb-ot-maxp-table.hh index 3bbc803e7..e4b67ab29 100644 --- a/src/hb-ot-maxp-table.hh +++ b/src/hb-ot-maxp-table.hh @@ -71,7 +71,7 @@ struct maxpV1Tail struct maxp { - enum { tableTag = HB_OT_TAG_maxp }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_maxp; unsigned int get_num_glyphs () const { return numGlyphs; } diff --git a/src/hb-ot-name-table.hh b/src/hb-ot-name-table.hh index 2d5ac6342..c8ababd7b 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 { - enum { tableTag = HB_OT_TAG_name }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_name; unsigned int get_size () const { return min_size + count * nameRecordZ.item_size; } diff --git a/src/hb-ot-os2-table.hh b/src/hb-ot-os2-table.hh index 4c1812c32..68dd63e01 100644 --- a/src/hb-ot-os2-table.hh +++ b/src/hb-ot-os2-table.hh @@ -92,7 +92,7 @@ struct OS2V5Tail struct OS2 { - enum { tableTag = HB_OT_TAG_OS2 }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_OS2; bool has_data () const { return this != &Null (OS2); } diff --git a/src/hb-ot-post-table.hh b/src/hb-ot-post-table.hh index a799b869f..43c1143cf 100644 --- a/src/hb-ot-post-table.hh +++ b/src/hb-ot-post-table.hh @@ -71,7 +71,7 @@ struct postV2Tail struct post { - enum { tableTag = HB_OT_TAG_post }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_post; 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 d85958b54..04a2ee99e 100644 --- a/src/hb-ot-stat-table.hh +++ b/src/hb-ot-stat-table.hh @@ -225,7 +225,7 @@ struct StatAxisRecord struct STAT { - enum { tableTag = HB_OT_TAG_STAT }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_STAT; 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 67a60f5e0..c4a192dc9 100644 --- a/src/hb-ot-var-avar-table.hh +++ b/src/hb-ot-var-avar-table.hh @@ -99,7 +99,7 @@ struct SegmentMaps : ArrayOf struct avar { - enum { tableTag = HB_OT_TAG_avar }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_avar; 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 92d164c1b..78cb3c867 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 { - enum { tableTag = HB_OT_TAG_fvar }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_fvar; bool has_data () const { return version.to_int (); } diff --git a/src/hb-ot-var-hvar-table.hh b/src/hb-ot-var-hvar-table.hh index 2640f07ee..a8d9fe3c8 100644 --- a/src/hb-ot-var-hvar-table.hh +++ b/src/hb-ot-var-hvar-table.hh @@ -100,8 +100,8 @@ struct DeltaSetIndexMap struct HVARVVAR { - enum { HVARTag = HB_OT_TAG_HVAR }; - enum { VVARTag = HB_OT_TAG_VVAR }; + static constexpr hb_tag_t HVARTag = HB_OT_TAG_HVAR; + static constexpr hb_tag_t VVARTag = HB_OT_TAG_VVAR; bool sanitize (hb_sanitize_context_t *c) const { @@ -140,10 +140,10 @@ struct HVARVVAR }; struct HVAR : HVARVVAR { - enum { tableTag = HB_OT_TAG_HVAR }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_HVAR; }; struct VVAR : HVARVVAR { - enum { tableTag = HB_OT_TAG_VVAR }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_VVAR; 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 a5eeddc54..0dd63e510 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 { - enum { tableTag = HB_OT_TAG_MVAR }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_MVAR; 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 f11c74593..0202fcc56 100644 --- a/src/hb-ot-vorg-table.hh +++ b/src/hb-ot-vorg-table.hh @@ -57,7 +57,7 @@ struct VertOriginMetric struct VORG { - enum { tableTag = HB_OT_TAG_VORG }; + static constexpr hb_tag_t tableTag = HB_OT_TAG_VORG; bool has_data () const { return version.to_int (); }