[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Devel] Conflicting typedefs?
From: |
Ken Hancock |
Subject: |
[Devel] Conflicting typedefs? |
Date: |
Tue, 25 May 2004 14:08:51 -0500 |
ftc_face_node_compare returns a FT_Bool (as does other MruCompare functions,
but the header lists it as FT_Init.
typedef FT_Int
(*FTC_MruNode_CompareFunc)( FTC_MruNode node,
FT_Pointer key );
I'm seeing on Visual Studio 7, my FTC_MruList_Find for the FaceID executing
correctly.
Visual Studio 7 correction returns zero from (node->faceid == face_id).
node->face_id = 4
face_id = 3
FT_CALLBACK_DEF( FT_Bool )
ftc_face_node_compare( FTC_FaceNode node,
FTC_FaceID face_id )
{
return FT_BOOL( node->face_id == face_id );
}
HOWEVER, the compare() function below treats this zero return as TRUE.
FT_EXPORT_DEF( FTC_MruNode )
FTC_MruList_Find( FTC_MruList list,
FT_Pointer key )
<snip>
// ftc_face_node_compare returns 0, but we execute as if compare() is
true
if ( compare( node, key ) )
{
if ( node != first )
FTC_MruNode_Up( &list->nodes, node );
return node;
}
Changing FT_BOOL to (FT_Bool) in ftc_face_node_compare fixes this problem.
- [Devel] Conflicting typedefs?,
Ken Hancock <=