freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype][master] [cache] Remove some casts, clean up tra


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype][master] [cache] Remove some casts, clean up tracing.
Date: Tue, 02 Aug 2022 00:27:51 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType

Commits:

  • 039b9071
    by Alexei Podtelezhnikov at 2022-08-01T20:19:12-04:00
    [cache] Remove some casts, clean up tracing.
    
    * src/cache/ftcbasic.c (FTC_ImageCache_Lookup, FTC_SBitCache_Lookup):
    Clean up tracing types.
    * src/cache/ftccache.c (ftc_node_destroy): Ditto.
    * src/cache/ftcmanag.c (FTC_Manager_Check): Ditto.
    (FTC_Manager_Check, FTC_Node_Unref): Remove a cast.
    * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Ditto.
    

4 changed files:

Changes:

  • src/cache/ftcbasic.c
    ... ... @@ -320,7 +320,7 @@
    320 320
     #if 0xFFFFFFFFUL > FT_UINT_MAX
    
    321 321
         if ( (type->flags & (FT_ULong)FT_UINT_MAX) )
    
    322 322
           FT_TRACE1(( "FTC_ImageCache_Lookup:"
    
    323
    -                  " higher bits in load_flags 0x%x are dropped\n",
    
    323
    +                  " higher bits in load_flags 0x%lx are dropped\n",
    
    324 324
                       (FT_ULong)type->flags & ~((FT_ULong)FT_UINT_MAX) ));
    
    325 325
     #endif
    
    326 326
     
    
    ... ... @@ -518,7 +518,7 @@
    518 518
     #if 0xFFFFFFFFUL > FT_UINT_MAX
    
    519 519
         if ( (type->flags & (FT_ULong)FT_UINT_MAX) )
    
    520 520
           FT_TRACE1(( "FTC_ImageCache_Lookup:"
    
    521
    -                  " higher bits in load_flags 0x%x are dropped\n",
    
    521
    +                  " higher bits in load_flags 0x%lx are dropped\n",
    
    522 522
                       (FT_ULong)type->flags & ~((FT_ULong)FT_UINT_MAX) ));
    
    523 523
     #endif
    
    524 524
     
    

  • src/cache/ftccache.c
    ... ... @@ -307,7 +307,7 @@
    307 307
     #if 0
    
    308 308
         /* check, just in case of general corruption :-) */
    
    309 309
         if ( manager->num_nodes == 0 )
    
    310
    -      FT_TRACE0(( "ftc_node_destroy: invalid cache node count (%d)\n",
    
    310
    +      FT_TRACE0(( "ftc_node_destroy: invalid cache node count (%u)\n",
    
    311 311
                       manager->num_nodes ));
    
    312 312
     #endif
    
    313 313
       }
    

  • src/cache/ftccmap.c
    ... ... @@ -295,7 +295,7 @@
    295 295
           if ( error )
    
    296 296
             goto Exit;
    
    297 297
     
    
    298
    -      if ( (FT_UInt)cmap_index < (FT_UInt)face->num_charmaps )
    
    298
    +      if ( cmap_index < face->num_charmaps )
    
    299 299
           {
    
    300 300
             FT_CharMap  old, cmap  = NULL;
    
    301 301
     
    

  • src/cache/ftcmanag.c
    ... ... @@ -488,8 +488,8 @@
    488 488
             FTC_Cache  cache = manager->caches[node->cache_index];
    
    489 489
     
    
    490 490
     
    
    491
    -        if ( (FT_UInt)node->cache_index >= manager->num_caches )
    
    492
    -          FT_TRACE0(( "FTC_Manager_Check: invalid node (cache index = %ld\n",
    
    491
    +        if ( node->cache_index >= manager->num_caches )
    
    492
    +          FT_TRACE0(( "FTC_Manager_Check: invalid node (cache index = %hu\n",
    
    493 493
                           node->cache_index ));
    
    494 494
             else
    
    495 495
               weight += cache->clazz.node_weight( node, cache );
    
    ... ... @@ -519,7 +519,7 @@
    519 519
     
    
    520 520
           if ( count != manager->num_nodes )
    
    521 521
             FT_TRACE0(( "FTC_Manager_Check:"
    
    522
    -                    " invalid cache node count %d instead of %d\n",
    
    522
    +                    " invalid cache node count %u instead of %u\n",
    
    523 523
                         manager->num_nodes, count ));
    
    524 524
         }
    
    525 525
       }
    
    ... ... @@ -547,7 +547,7 @@
    547 547
     #ifdef FT_DEBUG_ERROR
    
    548 548
         FTC_Manager_Check( manager );
    
    549 549
     
    
    550
    -    FT_TRACE0(( "compressing, weight = %ld, max = %ld, nodes = %d\n",
    
    550
    +    FT_TRACE0(( "compressing, weight = %ld, max = %ld, nodes = %u\n",
    
    551 551
                     manager->cur_weight, manager->max_weight,
    
    552 552
                     manager->num_nodes ));
    
    553 553
     #endif
    
    ... ... @@ -693,9 +693,9 @@
    693 693
       FTC_Node_Unref( FTC_Node     node,
    
    694 694
                       FTC_Manager  manager )
    
    695 695
       {
    
    696
    -    if ( node                                             &&
    
    697
    -         manager                                          &&
    
    698
    -         (FT_UInt)node->cache_index < manager->num_caches )
    
    696
    +    if ( node                                    &&
    
    697
    +         manager                                 &&
    
    698
    +         node->cache_index < manager->num_caches )
    
    699 699
           node->ref_count--;
    
    700 700
       }
    
    701 701
     
    


  • reply via email to

    [Prev in Thread] Current Thread [Next in Thread]