[aat] Fix some struct sizes
authorBehdad Esfahbod <behdad@behdad.org>
Fri, 12 Jan 2018 11:04:53 +0000 (12:04 +0100)
committerBehdad Esfahbod <behdad@behdad.org>
Fri, 12 Jan 2018 11:04:53 +0000 (12:04 +0100)
I hate it that with my compiler at least, it doesn't catch totally uncompilable
statements in templates if they are not used...

src/hb-aat-layout-common-private.hh
src/hb-aat-layout-morx-table.hh

index 990be2e7205d7a0e837dd5552a38f8737a237b63..a67ee5283dc83a1bf98be8927f330466c872587b 100644 (file)
@@ -602,7 +602,7 @@ struct StateTable
                entryTable;     /* Offset to the entry array. */
 
   public:
-  DEFINE_SIZE_UNION (2, format);
+  DEFINE_SIZE_STATIC (16);
 };
 
 template <typename EntryData>
index f07158944769ac405685b8a88f3338f7e4e5292f..64c946ecb717d5d38206963ce944071b509d2742 100644 (file)
@@ -169,7 +169,7 @@ struct RearrangementSubtable
   protected:
   StateTable<void>     machine;
   public:
-  DEFINE_SIZE_MIN (2);
+  DEFINE_SIZE_STATIC (16);
 };
 
 struct ContextualSubtable
@@ -283,7 +283,7 @@ struct ContextualSubtable
   OffsetTo<UnsizedOffsetListOf<Lookup<GlyphID>, HBUINT32>, HBUINT32>
                        substitutionTables;
   public:
-  DEFINE_SIZE_MIN (2);
+  DEFINE_SIZE_STATIC (20);
 };
 
 struct LigatureSubtable
@@ -436,7 +436,7 @@ struct ChainSubtable
   InsertionSubtable            insertion;
   } u;
   public:
-  DEFINE_SIZE_MIN (2 * sizeof (HBUINT32) + 4);
+  DEFINE_SIZE_MIN (12);
 };
 
 struct Chain
@@ -488,7 +488,7 @@ struct Chain
   // subtableGlyphCoverageArray if major == 3
 
   public:
-  DEFINE_SIZE_MIN (8 + 2 * sizeof (HBUINT32));
+  DEFINE_SIZE_MIN (16);
 };