From d52166ae9d933f74249be2ae746ba9ca07de9c09 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Mon, 8 May 2023 06:15:44 +0200 Subject: [PATCH] [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. --- src/cache/ftcbasic.c | 8 ++++---- src/cache/ftcglyph.c | 14 -------------- src/cache/ftcglyph.h | 15 +-------------- src/cache/ftcsbits.c | 15 --------------- src/cache/ftcsbits.h | 11 ----------- 5 files changed, 5 insertions(+), 58 deletions(-) diff --git a/src/cache/ftcbasic.c b/src/cache/ftcbasic.c index 4c6d41b2c..24a56c8d2 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 b3fb2f219..5cbda318f 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 728d4db1d..0181e9816 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 ee9dab263..216a710e3 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 3473923f0..e833cb5c3 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