Convert "static const bool" constants to anonymous enum
This commit is contained in:
parent
861bc75349
commit
44cbd2ea3d
|
@ -675,7 +675,7 @@ struct ClassTable
|
||||||
|
|
||||||
struct ObsoleteTypes
|
struct ObsoleteTypes
|
||||||
{
|
{
|
||||||
static const bool extended = false;
|
enum { extended = false };
|
||||||
typedef HBUINT16 HBUINT;
|
typedef HBUINT16 HBUINT;
|
||||||
typedef HBUINT8 HBUSHORT;
|
typedef HBUINT8 HBUSHORT;
|
||||||
typedef ClassTable<HBUINT8> ClassTypeNarrow;
|
typedef ClassTable<HBUINT8> ClassTypeNarrow;
|
||||||
|
@ -705,7 +705,7 @@ struct ObsoleteTypes
|
||||||
};
|
};
|
||||||
struct ExtendedTypes
|
struct ExtendedTypes
|
||||||
{
|
{
|
||||||
static const bool extended = true;
|
enum { extended = true };
|
||||||
typedef HBUINT32 HBUINT;
|
typedef HBUINT32 HBUINT;
|
||||||
typedef HBUINT16 HBUSHORT;
|
typedef HBUINT16 HBUSHORT;
|
||||||
typedef Lookup<HBUINT16> ClassTypeNarrow;
|
typedef Lookup<HBUINT16> ClassTypeNarrow;
|
||||||
|
|
|
@ -211,7 +211,7 @@ struct KerxSubTableFormat1
|
||||||
|
|
||||||
struct driver_context_t
|
struct driver_context_t
|
||||||
{
|
{
|
||||||
static const bool in_place = true;
|
enum { in_place = true };
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
DontAdvance = Format1EntryT::DontAdvance,
|
DontAdvance = Format1EntryT::DontAdvance,
|
||||||
|
@ -472,7 +472,7 @@ struct KerxSubTableFormat4
|
||||||
|
|
||||||
struct driver_context_t
|
struct driver_context_t
|
||||||
{
|
{
|
||||||
static const bool in_place = true;
|
enum { in_place = true };
|
||||||
enum Flags
|
enum Flags
|
||||||
{
|
{
|
||||||
Mark = 0x8000, /* If set, remember this glyph as the marked glyph. */
|
Mark = 0x8000, /* If set, remember this glyph as the marked glyph. */
|
||||||
|
|
|
@ -54,7 +54,7 @@ struct RearrangementSubtable
|
||||||
|
|
||||||
struct driver_context_t
|
struct driver_context_t
|
||||||
{
|
{
|
||||||
static const bool in_place = true;
|
enum { in_place = true };
|
||||||
enum Flags
|
enum Flags
|
||||||
{
|
{
|
||||||
MarkFirst = 0x8000, /* If set, make the current glyph the first
|
MarkFirst = 0x8000, /* If set, make the current glyph the first
|
||||||
|
@ -204,7 +204,7 @@ struct ContextualSubtable
|
||||||
|
|
||||||
struct driver_context_t
|
struct driver_context_t
|
||||||
{
|
{
|
||||||
static const bool in_place = true;
|
enum { in_place = true };
|
||||||
enum Flags
|
enum Flags
|
||||||
{
|
{
|
||||||
SetMark = 0x8000, /* If set, make the current glyph the marked glyph. */
|
SetMark = 0x8000, /* If set, make the current glyph the marked glyph. */
|
||||||
|
@ -424,7 +424,7 @@ struct LigatureSubtable
|
||||||
|
|
||||||
struct driver_context_t
|
struct driver_context_t
|
||||||
{
|
{
|
||||||
static const bool in_place = false;
|
enum { in_place = false };
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
DontAdvance = LigatureEntryT::DontAdvance,
|
DontAdvance = LigatureEntryT::DontAdvance,
|
||||||
|
@ -660,7 +660,7 @@ struct InsertionSubtable
|
||||||
|
|
||||||
struct driver_context_t
|
struct driver_context_t
|
||||||
{
|
{
|
||||||
static const bool in_place = false;
|
enum { in_place = false };
|
||||||
enum Flags
|
enum Flags
|
||||||
{
|
{
|
||||||
SetMark = 0x8000, /* If set, mark the current glyph. */
|
SetMark = 0x8000, /* If set, mark the current glyph. */
|
||||||
|
|
|
@ -735,26 +735,26 @@ inline hb_sorted_array_t<T> hb_sorted_array (T *array, unsigned int len)
|
||||||
|
|
||||||
struct HbOpOr
|
struct HbOpOr
|
||||||
{
|
{
|
||||||
static const bool passthru_left = true;
|
enum { passthru_left = true };
|
||||||
static const bool passthru_right = true;
|
enum { passthru_right = true };
|
||||||
template <typename T> static void process (T &o, const T &a, const T &b) { o = a | b; }
|
template <typename T> static void process (T &o, const T &a, const T &b) { o = a | b; }
|
||||||
};
|
};
|
||||||
struct HbOpAnd
|
struct HbOpAnd
|
||||||
{
|
{
|
||||||
static const bool passthru_left = false;
|
enum { passthru_left = false };
|
||||||
static const bool passthru_right = false;
|
enum { passthru_right = false };
|
||||||
template <typename T> static void process (T &o, const T &a, const T &b) { o = a & b; }
|
template <typename T> static void process (T &o, const T &a, const T &b) { o = a & b; }
|
||||||
};
|
};
|
||||||
struct HbOpMinus
|
struct HbOpMinus
|
||||||
{
|
{
|
||||||
static const bool passthru_left = true;
|
enum { passthru_left = true };
|
||||||
static const bool passthru_right = false;
|
enum { passthru_right = false };
|
||||||
template <typename T> static void process (T &o, const T &a, const T &b) { o = a & ~b; }
|
template <typename T> static void process (T &o, const T &a, const T &b) { o = a & ~b; }
|
||||||
};
|
};
|
||||||
struct HbOpXor
|
struct HbOpXor
|
||||||
{
|
{
|
||||||
static const bool passthru_left = true;
|
enum { passthru_left = true };
|
||||||
static const bool passthru_right = true;
|
enum { passthru_right = true };
|
||||||
template <typename T> static void process (T &o, const T &a, const T &b) { o = a ^ b; }
|
template <typename T> static void process (T &o, const T &a, const T &b) { o = a ^ b; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -160,7 +160,7 @@ struct KernSubTable
|
||||||
|
|
||||||
struct KernOTSubTableHeader
|
struct KernOTSubTableHeader
|
||||||
{
|
{
|
||||||
static const bool apple = false;
|
enum { apple = false };
|
||||||
typedef AAT::ObsoleteTypes Types;
|
typedef AAT::ObsoleteTypes Types;
|
||||||
|
|
||||||
inline unsigned int tuple_count (void) const { return 0; }
|
inline unsigned int tuple_count (void) const { return 0; }
|
||||||
|
@ -215,7 +215,7 @@ struct KernOT : AAT::KerxTable<KernOT>
|
||||||
|
|
||||||
struct KernAATSubTableHeader
|
struct KernAATSubTableHeader
|
||||||
{
|
{
|
||||||
static const bool apple = true;
|
enum { apple = true };
|
||||||
typedef AAT::ObsoleteTypes Types;
|
typedef AAT::ObsoleteTypes Types;
|
||||||
|
|
||||||
inline unsigned int tuple_count (void) const { return 0; }
|
inline unsigned int tuple_count (void) const { return 0; }
|
||||||
|
|
|
@ -1299,7 +1299,7 @@ hb_ot_layout_feature_get_characters (hb_face_t *face,
|
||||||
struct GSUBProxy
|
struct GSUBProxy
|
||||||
{
|
{
|
||||||
enum { table_index = 0 };
|
enum { table_index = 0 };
|
||||||
static const bool inplace = false;
|
enum { inplace = false };
|
||||||
typedef OT::SubstLookup Lookup;
|
typedef OT::SubstLookup Lookup;
|
||||||
|
|
||||||
GSUBProxy (hb_face_t *face) :
|
GSUBProxy (hb_face_t *face) :
|
||||||
|
@ -1313,7 +1313,7 @@ struct GSUBProxy
|
||||||
struct GPOSProxy
|
struct GPOSProxy
|
||||||
{
|
{
|
||||||
enum { table_index = 1 };
|
enum { table_index = 1 };
|
||||||
static const bool inplace = true;
|
enum { inplace = true };
|
||||||
typedef OT::PosLookup Lookup;
|
typedef OT::PosLookup Lookup;
|
||||||
|
|
||||||
GPOSProxy (hb_face_t *face) :
|
GPOSProxy (hb_face_t *face) :
|
||||||
|
|
Loading…
Reference in New Issue