Convert "static const hb_tag_t" constants to enum

pull/1429/head
Behdad Esfahbod 6 years ago
parent 9e4138c825
commit 5c4fead734
  1. 2
      src/hb-aat-layout-ankr-table.hh
  2. 2
      src/hb-aat-layout-bsln-table.hh
  3. 2
      src/hb-aat-layout-feat-table.hh
  4. 2
      src/hb-aat-layout-just-table.hh
  5. 2
      src/hb-aat-layout-kerx-table.hh
  6. 2
      src/hb-aat-layout-lcar-table.hh
  7. 6
      src/hb-aat-layout-morx-table.hh
  8. 2
      src/hb-aat-layout-trak-table.hh
  9. 2
      src/hb-aat-ltag-table.hh
  10. 2
      src/hb-ot-cmap-table.hh
  11. 4
      src/hb-ot-color-cbdt-table.hh
  12. 2
      src/hb-ot-color-colr-table.hh
  13. 2
      src/hb-ot-color-cpal-table.hh
  14. 2
      src/hb-ot-color-sbix-table.hh
  15. 2
      src/hb-ot-color-svg-table.hh
  16. 4
      src/hb-ot-glyf-table.hh
  17. 2
      src/hb-ot-hdmx-table.hh
  18. 2
      src/hb-ot-head-table.hh
  19. 4
      src/hb-ot-hhea-table.hh
  20. 14
      src/hb-ot-hmtx-table.hh
  21. 6
      src/hb-ot-kern-table.hh
  22. 2
      src/hb-ot-layout-base-table.hh
  23. 2
      src/hb-ot-layout-gdef-table.hh
  24. 2
      src/hb-ot-layout-gpos-table.hh
  25. 2
      src/hb-ot-layout-gsub-table.hh
  26. 2
      src/hb-ot-layout-jstf-table.hh
  27. 2
      src/hb-ot-math-table.hh
  28. 2
      src/hb-ot-maxp-table.hh
  29. 2
      src/hb-ot-name-table.hh
  30. 2
      src/hb-ot-os2-table.hh
  31. 2
      src/hb-ot-post-table.hh
  32. 2
      src/hb-ot-stat-table.hh
  33. 2
      src/hb-ot-var-avar-table.hh
  34. 2
      src/hb-ot-var-fvar-table.hh
  35. 8
      src/hb-ot-var-hvar-table.hh
  36. 2
      src/hb-ot-var-mvar-table.hh
  37. 2
      src/hb-ot-vorg-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,

@ -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
{

@ -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 (); }

@ -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
{

@ -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;

@ -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,

@ -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 };
};

@ -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 (); }

@ -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
{

@ -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
{

@ -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
{

@ -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; }

@ -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; }

@ -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; }

@ -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; }

@ -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
{

@ -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
{

@ -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
{

@ -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 };
};

@ -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 {};

@ -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; }

@ -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; }

@ -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,

@ -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)); }

@ -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)); }

@ -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; }

@ -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 (); }

@ -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
{

@ -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; }

@ -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
{

@ -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
{

@ -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
{

@ -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
{

@ -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 (); }

@ -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
{

@ -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
{

@ -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 (); }

Loading…
Cancel
Save