Commit d52166ae9d933f74249be2ae746ba9ca07de9c09

Werner Lemberg 2023-05-08T06:15:44

[cache] Signature fixes. * src/cache/ftcglyph.c, src/cache/ftcglyph.h (FTC_GNode_Compare): Remove redundant function. It is equivalent to `ftc_gnode_compare` and becomes completely meaningless with fixed signatures. Update all callers. * src/cache/ftcsbits.c, src/cache/ftcsbits.h (FTC_SNode_Compare): Remove redundant function. It is equivalent to `ftc_snode_compare` and becomes completely meaningless with fixed signatures. Update all callers.

diff --git a/src/cache/ftcbasic.c b/src/cache/ftcbasic.c
index 4c6d41b..24a56c8 100644
--- a/src/cache/ftcbasic.c
+++ b/src/cache/ftcbasic.c
@@ -337,7 +337,7 @@
 #if 1  /* inlining is about 50% faster! */
     FTC_GCACHE_LOOKUP_CMP( cache,
                            ftc_basic_family_compare,
-                           FTC_GNode_Compare,
+                           ftc_gnode_compare,
                            hash, gindex,
                            &query,
                            node,
@@ -411,7 +411,7 @@
 
     FTC_GCACHE_LOOKUP_CMP( cache,
                            ftc_basic_family_compare,
-                           FTC_GNode_Compare,
+                           ftc_gnode_compare,
                            hash, gindex,
                            &query,
                            node,
@@ -537,7 +537,7 @@
 #if 1  /* inlining is about 50% faster! */
     FTC_GCACHE_LOOKUP_CMP( cache,
                            ftc_basic_family_compare,
-                           FTC_SNode_Compare,
+                           ftc_snode_compare,
                            hash, gindex,
                            &query,
                            node,
@@ -613,7 +613,7 @@
 
     FTC_GCACHE_LOOKUP_CMP( cache,
                            ftc_basic_family_compare,
-                           FTC_SNode_Compare,
+                           ftc_snode_compare,
                            hash, gindex,
                            &query,
                            node,
diff --git a/src/cache/ftcglyph.c b/src/cache/ftcglyph.c
index b3fb2f2..5cbda31 100644
--- a/src/cache/ftcglyph.c
+++ b/src/cache/ftcglyph.c
@@ -79,20 +79,6 @@
   }
 
 
-#ifdef FTC_INLINE
-
-  FT_LOCAL_DEF( FT_Bool )
-  FTC_GNode_Compare( FTC_GNode   gnode,
-                     FTC_GQuery  gquery,
-                     FTC_Cache   cache,
-                     FT_Bool*    list_changed )
-  {
-    return ftc_gnode_compare( FTC_NODE( gnode ), gquery,
-                              cache, list_changed );
-  }
-
-#endif
-
   /*************************************************************************/
   /*************************************************************************/
   /*****                                                               *****/
diff --git a/src/cache/ftcglyph.h b/src/cache/ftcglyph.h
index 728d4db..0181e98 100644
--- a/src/cache/ftcglyph.h
+++ b/src/cache/ftcglyph.h
@@ -58,7 +58,7 @@
    * - FTC_GNode sub-class, e.g. MyNode, with relevant methods:
    *     my_node_new            (must call FTC_GNode_Init)
    *     my_node_free           (must call FTC_GNode_Done)
-   *     my_node_compare        (must call FTC_GNode_Compare)
+   *     my_node_compare        (must call ftc_gnode_compare)
    *     my_node_remove_faceid  (must call ftc_gnode_unselect in case
    *                             of match)
    *
@@ -179,19 +179,6 @@ FT_BEGIN_HEADER
                   FT_UInt     gindex,  /* glyph index for node */
                   FTC_Family  family );
 
-#ifdef FTC_INLINE
-
-  /* returns TRUE iff the query's glyph index correspond to the node;  */
-  /* this assumes that the `family' and `hash' fields of the query are */
-  /* already correctly set                                             */
-  FT_LOCAL( FT_Bool )
-  FTC_GNode_Compare( FTC_GNode   gnode,
-                     FTC_GQuery  gquery,
-                     FTC_Cache   cache,
-                     FT_Bool*    list_changed );
-
-#endif
-
   /* call this function to clear a node's family -- this is necessary */
   /* to implement the `node_remove_faceid' cache method correctly     */
   FT_LOCAL( void )
diff --git a/src/cache/ftcsbits.c b/src/cache/ftcsbits.c
index ee9dab2..216a710 100644
--- a/src/cache/ftcsbits.c
+++ b/src/cache/ftcsbits.c
@@ -411,19 +411,4 @@
     return result;
   }
 
-
-#ifdef FTC_INLINE
-
-  FT_LOCAL_DEF( FT_Bool )
-  FTC_SNode_Compare( FTC_SNode   snode,
-                     FTC_GQuery  gquery,
-                     FTC_Cache   cache,
-                     FT_Bool*    list_changed )
-  {
-    return ftc_snode_compare( FTC_NODE( snode ), gquery,
-                              cache, list_changed );
-  }
-
-#endif
-
 /* END */
diff --git a/src/cache/ftcsbits.h b/src/cache/ftcsbits.h
index 3473923..e833cb5 100644
--- a/src/cache/ftcsbits.h
+++ b/src/cache/ftcsbits.h
@@ -81,17 +81,6 @@ FT_BEGIN_HEADER
   FTC_SNode_Weight( FTC_SNode  inode );
 #endif
 
-
-#ifdef FTC_INLINE
-
-  FT_LOCAL( FT_Bool )
-  FTC_SNode_Compare( FTC_SNode   snode,
-                     FTC_GQuery  gquery,
-                     FTC_Cache   cache,
-                     FT_Bool*    list_changed);
-
-#endif
-
   /* */
 
 FT_END_HEADER