[HB] Simplify version check in GSUB/GPOS
authorBehdad Esfahbod <behdad@behdad.org>
Sun, 24 May 2009 04:53:28 +0000 (00:53 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Mon, 2 Nov 2009 19:40:17 +0000 (14:40 -0500)
src/hb-ot-layout-gpos-private.h
src/hb-ot-layout-gsub-private.h

index 275a5e8..3854aeb 100644 (file)
@@ -1313,7 +1313,10 @@ struct GPOS : GSUBGPOS
 {
   static const hb_tag_t Tag            = HB_TAG ('G','P','O','S');
 
-  STATIC_DEFINE_GET_FOR_DATA_CHECK_MAJOR_VERSION (GPOS, 1);
+  static inline const GPOS& get_for_data (const char *data)
+  {
+    return (const GPOS&) GSUBGPOS::get_for_data (data);
+  }
 
   inline const PosLookup& get_lookup (unsigned int i) const
   {
index 757947c..c025ac5 100644 (file)
@@ -730,7 +730,10 @@ struct GSUB : GSUBGPOS
 {
   static const hb_tag_t Tag            = HB_TAG ('G','S','U','B');
 
-  STATIC_DEFINE_GET_FOR_DATA_CHECK_MAJOR_VERSION (GSUB, 1);
+  static inline const GSUB& get_for_data (const char *data)
+  {
+    return (const GSUB&) GSUBGPOS::get_for_data (data);
+  }
 
   inline const SubstLookup& get_lookup (unsigned int i) const
   {