Minor
authorBehdad Esfahbod <behdad@behdad.org>
Sun, 12 Aug 2018 19:27:47 +0000 (12:27 -0700)
committerBehdad Esfahbod <behdad@behdad.org>
Sun, 12 Aug 2018 19:27:47 +0000 (12:27 -0700)
src/hb-machinery-private.hh
src/hb-ot-layout-private.hh

index beb61fa..ea6dfa4 100644 (file)
@@ -696,11 +696,13 @@ struct hb_object_lazy_loader_t : hb_lazy_loader_t<hb_object_lazy_loader_t<Wheres
   }
 };
 
-template <unsigned int WheresFace, typename T>
-struct hb_table_lazy_loader_t : hb_lazy_loader_t<hb_table_lazy_loader_t<WheresFace, T>,
+template <typename T, unsigned int WheresFace>
+struct hb_table_lazy_loader_t : hb_lazy_loader_t<hb_table_lazy_loader_t<T, WheresFace>,
                                                 hb_face_t, WheresFace,
                                                 T, hb_blob_t>
 {
+  static_assert (WheresFace > 0, "");
+
   static inline hb_blob_t *create (hb_face_t *face)
   {
     if (unlikely (!face))
index de1adda..612bc7f 100644 (file)
@@ -205,7 +205,7 @@ struct hb_ot_layout_t
 
     hb_face_t *face; /* MUST be JUST before the lazy loaders. */
 #define HB_OT_LAYOUT_TABLE(Namespace, Type) \
-    hb_table_lazy_loader_t<HB_OT_LAYOUT_TABLE_ORDER (Namespace, Type), struct Namespace::Type> Type;
+    hb_table_lazy_loader_t<struct Namespace::Type, HB_OT_LAYOUT_TABLE_ORDER (Namespace, Type)> Type;
     HB_OT_LAYOUT_TABLES
 #undef HB_OT_LAYOUT_TABLE
   } table;