diff --git a/src/hb-aat-layout-common.hh b/src/hb-aat-layout-common.hh index 431a12bc7a676569d04bfc7dd8281ddd64f51a07..133e8731a84716cfd05ef25b1b7b0f1f726ba0e0 100644 --- a/src/hb-aat-layout-common.hh +++ b/src/hb-aat-layout-common.hh @@ -669,7 +669,7 @@ struct ClassTable struct ObsoleteTypes { - enum { extended = false }; + static constexpr bool extended = false; typedef HBUINT16 HBUINT; typedef HBUINT8 HBUSHORT; typedef ClassTable ClassTypeNarrow; @@ -699,7 +699,7 @@ struct ObsoleteTypes }; struct ExtendedTypes { - enum { extended = true }; + static constexpr bool extended = true; typedef HBUINT32 HBUINT; typedef HBUINT16 HBUSHORT; typedef Lookup ClassTypeNarrow; diff --git a/src/hb-aat-layout-kerx-table.hh b/src/hb-aat-layout-kerx-table.hh index b86c5131b136ad832b338f186921e77602a576af..db855f3dd0cf93de5534aca5baaca3acd98acd45 100644 --- a/src/hb-aat-layout-kerx-table.hh +++ b/src/hb-aat-layout-kerx-table.hh @@ -210,7 +210,7 @@ struct KerxSubTableFormat1 struct driver_context_t { - enum { in_place = true }; + static constexpr bool in_place = true; enum { DontAdvance = Format1EntryT::DontAdvance, @@ -471,7 +471,7 @@ struct KerxSubTableFormat4 struct driver_context_t { - enum { in_place = true }; + static constexpr bool in_place = true; enum Flags { Mark = 0x8000, /* If set, remember this glyph as the marked glyph. */ diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh index d8a90bbd80eaea70a0235753260b5f291ed8e798..05b5081480e837992f960712d8ace284f8841f95 100644 --- a/src/hb-aat-layout-morx-table.hh +++ b/src/hb-aat-layout-morx-table.hh @@ -54,7 +54,7 @@ struct RearrangementSubtable struct driver_context_t { - enum { in_place = true }; + static constexpr bool in_place = true; enum Flags { MarkFirst = 0x8000, /* If set, make the current glyph the first @@ -204,7 +204,7 @@ struct ContextualSubtable struct driver_context_t { - enum { in_place = true }; + static constexpr bool in_place = true; enum Flags { SetMark = 0x8000, /* If set, make the current glyph the marked glyph. */ @@ -425,7 +425,7 @@ struct LigatureSubtable struct driver_context_t { - enum { in_place = false }; + static constexpr bool in_place = false; enum { DontAdvance = LigatureEntryT::DontAdvance, @@ -661,7 +661,7 @@ struct InsertionSubtable struct driver_context_t { - enum { in_place = false }; + static constexpr bool in_place = false; enum Flags { SetMark = 0x8000, /* If set, mark the current glyph. */ diff --git a/src/hb-dsalgs.hh b/src/hb-dsalgs.hh index 75ff456ac10acefc24f5d370d992dcb4676fed6e..9cfa290a6af8e45df681be7fae49053ac9840a85 100644 --- a/src/hb-dsalgs.hh +++ b/src/hb-dsalgs.hh @@ -553,26 +553,26 @@ hb_codepoint_parse (const char *s, unsigned int len, int base, hb_codepoint_t *o struct HbOpOr { - enum { passthru_left = true }; - enum { passthru_right = true }; + static constexpr bool passthru_left = true; + static constexpr bool passthru_right = true; template static void process (T &o, const T &a, const T &b) { o = a | b; } }; struct HbOpAnd { - enum { passthru_left = false }; - enum { passthru_right = false }; + static constexpr bool passthru_left = false; + static constexpr bool passthru_right = false; template static void process (T &o, const T &a, const T &b) { o = a & b; } }; struct HbOpMinus { - enum { passthru_left = true }; - enum { passthru_right = false }; + static constexpr bool passthru_left = true; + static constexpr bool passthru_right = false; template static void process (T &o, const T &a, const T &b) { o = a & ~b; } }; struct HbOpXor { - enum { passthru_left = true }; - enum { passthru_right = true }; + static constexpr bool passthru_left = true; + static constexpr bool passthru_right = true; template static void process (T &o, const T &a, const T &b) { o = a ^ b; } }; diff --git a/src/hb-ot-kern-table.hh b/src/hb-ot-kern-table.hh index 5e75d083b7683b2218867620db2ba2680fad0e2e..19d321e5633b3c4af4dff07c3ab233399f32a3ac 100644 --- a/src/hb-ot-kern-table.hh +++ b/src/hb-ot-kern-table.hh @@ -160,7 +160,7 @@ struct KernSubTable struct KernOTSubTableHeader { - enum { apple = false }; + static constexpr bool apple = false; typedef AAT::ObsoleteTypes Types; unsigned int tuple_count () const { return 0; } @@ -215,7 +215,7 @@ struct KernOT : AAT::KerxTable struct KernAATSubTableHeader { - enum { apple = true }; + static constexpr bool apple = true; typedef AAT::ObsoleteTypes Types; unsigned int tuple_count () const { return 0; } diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc index 179db6523844363010016611d63fe6ccd7db04c6..3ded3ada14e25413741e00b9ec62ca6e24b92271 100644 --- a/src/hb-ot-layout.cc +++ b/src/hb-ot-layout.cc @@ -1300,7 +1300,7 @@ hb_ot_layout_feature_get_characters (hb_face_t *face, struct GSUBProxy { enum { table_index = 0u }; - enum { inplace = false }; + static constexpr bool inplace = false; typedef OT::SubstLookup Lookup; GSUBProxy (hb_face_t *face) : @@ -1314,7 +1314,7 @@ struct GSUBProxy struct GPOSProxy { enum { table_index = 1u }; - enum { inplace = true }; + static constexpr bool inplace = true; typedef OT::PosLookup Lookup; GPOSProxy (hb_face_t *face) :