cache: Fix some data types mismatching with their sources.

This commit is contained in:
suzuki toshiya 2009-08-01 00:30:19 +09:00
parent ebf8e294fc
commit b566d42aa0
3 changed files with 18 additions and 6 deletions

View File

@ -1,3 +1,15 @@
2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
cache: Fix some data types mismatching with their sources.
* src/cache/ftccache.c (ftc_cache_resize): The types of
`p', `mask', `count' are matched with FTC_Cache->{p,mask}.
(FTC_Cache_Clear): The type of `old_index' is matched to
FTC_Cache->{p,mask}.
* src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): The type
of `_idx' is matched with FTC_Cache->{p,mask}.
2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
cache: Fix some data types mismatching with their sources.

10
src/cache/ftccache.c vendored
View File

@ -93,9 +93,9 @@
for (;;)
{
FTC_Node node, *pnode;
FT_UInt p = cache->p;
FT_UInt mask = cache->mask;
FT_UInt count = mask + p + 1; /* number of buckets */
FT_UFast p = cache->p;
FT_UFast mask = cache->mask;
FT_UFast count = mask + p + 1; /* number of buckets */
/* do we need to shrink the buckets array? */
@ -153,7 +153,7 @@
/* do we need to expand the buckets array? */
else if ( cache->slack > (FT_Long)count * FTC_HASH_SUB_LOAD )
{
FT_UInt old_index = p + mask;
FT_UFast old_index = p + mask;
FTC_Node* pold;
@ -347,7 +347,7 @@
{
FTC_Manager manager = cache->manager;
FT_UFast i;
FT_UInt count;
FT_UFast count;
count = cache->p + cache->mask + 1;

View File

@ -202,7 +202,7 @@ FT_BEGIN_HEADER
FTC_Cache _cache = FTC_CACHE(cache); \
FT_UInt32 _hash = (FT_UInt32)(hash); \
FTC_Node_CompareFunc _nodcomp = (FTC_Node_CompareFunc)(nodecmp); \
FT_UInt _idx; \
FT_UFast _idx; \
\
\
error = 0; \