Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType
Commits:
-
ae516e6a
by Alexei Podtelezhnikov at 2021-09-16T16:39:23-04:00
-
79d14cc2
by Alexei Podtelezhnikov at 2021-09-16T16:41:56-04:00
-
fce74b73
by Alexei Podtelezhnikov at 2021-09-16T17:03:19-04:00
5 changed files:
Changes:
... | ... | @@ -90,15 +90,14 @@ |
90 | 90 |
ftc_get_top_node_for_hash( FTC_Cache cache,
|
91 | 91 |
FT_Offset hash )
|
92 | 92 |
{
|
93 |
- FTC_Node* pnode;
|
|
94 | 93 |
FT_Offset idx;
|
95 | 94 |
|
96 | 95 |
|
97 | 96 |
idx = hash & cache->mask;
|
98 | 97 |
if ( idx < cache->p )
|
99 | 98 |
idx = hash & ( 2 * cache->mask + 1 );
|
100 |
- pnode = cache->buckets + idx;
|
|
101 |
- return pnode;
|
|
99 |
+ |
|
100 |
+ return cache->buckets + idx;
|
|
102 | 101 |
}
|
103 | 102 |
|
104 | 103 |
#endif /* !FTC_INLINE */
|
... | ... | @@ -360,7 +359,7 @@ |
360 | 359 |
|
361 | 360 |
for ( i = 0; i < count; i++ )
|
362 | 361 |
{
|
363 |
- FTC_Node *pnode = cache->buckets + i, next, node = *pnode;
|
|
362 |
+ FTC_Node node = cache->buckets[i], next;
|
|
364 | 363 |
|
365 | 364 |
|
366 | 365 |
while ( node )
|
... | ... | @@ -417,7 +416,7 @@ |
417 | 416 |
FTC_Node node )
|
418 | 417 |
{
|
419 | 418 |
node->hash = hash;
|
420 |
- node->cache_index = (FT_UInt16)cache->index;
|
|
419 |
+ node->cache_index = (FT_UShort)cache->index;
|
|
421 | 420 |
node->ref_count = 0;
|
422 | 421 |
|
423 | 422 |
ftc_node_hash_link( node, cache );
|
... | ... | @@ -273,12 +273,11 @@ |
273 | 273 |
if ( error )
|
274 | 274 |
goto Exit;
|
275 | 275 |
|
276 |
- FT_ASSERT( (FT_UInt)( char_code - FTC_CMAP_NODE( node )->first ) <
|
|
277 |
- FTC_CMAP_INDICES_MAX );
|
|
276 |
+ FT_ASSERT( char_code - FTC_CMAP_NODE( node )->first <
|
|
277 |
+ FTC_CMAP_INDICES_MAX );
|
|
278 | 278 |
|
279 | 279 |
/* something rotten can happen with rogue clients */
|
280 |
- if ( (FT_UInt)( char_code - FTC_CMAP_NODE( node )->first >=
|
|
281 |
- FTC_CMAP_INDICES_MAX ) )
|
|
280 |
+ if ( char_code - FTC_CMAP_NODE( node )->first >= FTC_CMAP_INDICES_MAX )
|
|
282 | 281 |
return 0; /* XXX: should return appropriate error */
|
283 | 282 |
|
284 | 283 |
gindex = FTC_CMAP_NODE( node )->indices[char_code -
|
... | ... | @@ -111,7 +111,7 @@ |
111 | 111 |
FTC_SFamilyClass clazz;
|
112 | 112 |
|
113 | 113 |
|
114 |
- if ( (FT_UInt)(gindex - gnode->gindex) >= snode->count )
|
|
114 |
+ if ( gindex - gnode->gindex >= snode->count )
|
|
115 | 115 |
{
|
116 | 116 |
FT_ERROR(( "ftc_snode_load: invalid glyph index" ));
|
117 | 117 |
return FT_THROW( Invalid_Argument );
|
... | ... | @@ -342,8 +342,8 @@ |
342 | 342 |
|
343 | 343 |
if (list_changed)
|
344 | 344 |
*list_changed = FALSE;
|
345 |
- result = FT_BOOL( gnode->family == gquery->family &&
|
|
346 |
- (FT_UInt)( gindex - gnode->gindex ) < snode->count );
|
|
345 |
+ result = FT_BOOL( gnode->family == gquery->family &&
|
|
346 |
+ gindex - gnode->gindex < snode->count );
|
|
347 | 347 |
if ( result )
|
348 | 348 |
{
|
349 | 349 |
/* check if we need to load the glyph bitmap now */
|
... | ... | @@ -771,8 +771,7 @@ |
771 | 771 |
|
772 | 772 |
case 3:
|
773 | 773 |
/* first, compare to the cache */
|
774 |
- if ( (FT_UInt)( glyph_index - fdselect->cache_first ) <
|
|
775 |
- fdselect->cache_count )
|
|
774 |
+ if ( glyph_index - fdselect->cache_first < fdselect->cache_count )
|
|
776 | 775 |
{
|
777 | 776 |
fd = fdselect->cache_fd;
|
778 | 777 |
break;
|
... | ... | @@ -238,7 +238,7 @@ THE SOFTWARE. |
238 | 238 |
{
|
239 | 239 |
for ( j = 0; j < sizeof ( tableNames ) / sizeof ( tableNames[0] );
|
240 | 240 |
j++ )
|
241 |
- if ( tables[i].type == (FT_UInt)( 1 << j ) )
|
|
241 |
+ if ( tables[i].type == 1UL << j )
|
|
242 | 242 |
name = tableNames[j];
|
243 | 243 |
|
244 | 244 |
FT_TRACE4(( " %d: type=%s, format=0x%lX,"
|