From 1f6ed356e0a849b61ce98b6a2f38d04d98c2191e Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 10 Sep 2016 00:01:10 -0700 Subject: [PATCH] [GX] Fix build with some compilers Eg. https://ci.appveyor.com/project/behdad/harfbuzz/build/1.0.48/job/o9mnd33kcdeeg30r hb-open-type-private.hh:103:29: error: static data member 'OT::Device::::::static_size' in unnamed class [-fpermissive] --- src/hb-ot-layout-common-private.hh | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/hb-ot-layout-common-private.hh b/src/hb-ot-layout-common-private.hh index 35889c712..c18e52033 100644 --- a/src/hb-ot-layout-common-private.hh +++ b/src/hb-ot-layout-common-private.hh @@ -1445,6 +1445,17 @@ struct VariationDevice DEFINE_SIZE_STATIC (6); }; +struct DeviceHeader +{ + protected: + USHORT reserved1; + USHORT reserved2; + public: + USHORT format; /* Format identifier */ + public: + DEFINE_SIZE_STATIC (6); +}; + struct Device { inline hb_position_t get_x_delta (hb_font_t *font, const VarStore &store) const @@ -1488,13 +1499,7 @@ struct Device protected: union { - struct { - USHORT reserved1; - USHORT reserved2; - USHORT format; /* Format identifier */ - public: - DEFINE_SIZE_STATIC (6); - } b; + DeviceHeader b; HintingDevice hinting; VariationDevice variation; } u;