freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype][master] * src/autofit/afhints.c (af_glyph_hints


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype][master] * src/autofit/afhints.c (af_glyph_hints_reload): Decrease casting.
Date: Fri, 01 Oct 2021 03:01:24 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType

Commits:

1 changed file:

Changes:

  • src/autofit/afhints.c
    ... ... @@ -862,7 +862,7 @@
    862 862
       {
    
    863 863
         FT_Error   error   = FT_Err_Ok;
    
    864 864
         AF_Point   points;
    
    865
    -    FT_UInt    old_max, new_max;
    
    865
    +    FT_Int     old_max, new_max;
    
    866 866
         FT_Fixed   x_scale = hints->x_scale;
    
    867 867
         FT_Fixed   y_scale = hints->y_scale;
    
    868 868
         FT_Pos     x_delta = hints->x_delta;
    
    ... ... @@ -879,8 +879,8 @@
    879 879
         hints->axis[1].num_edges    = 0;
    
    880 880
     
    
    881 881
         /* first of all, reallocate the contours array if necessary */
    
    882
    -    new_max = (FT_UInt)outline->n_contours;
    
    883
    -    old_max = (FT_UInt)hints->max_contours;
    
    882
    +    new_max = outline->n_contours;
    
    883
    +    old_max = hints->max_contours;
    
    884 884
     
    
    885 885
         if ( new_max <= AF_CONTOURS_EMBEDDED )
    
    886 886
         {
    
    ... ... @@ -895,12 +895,12 @@
    895 895
           if ( hints->contours == hints->embedded.contours )
    
    896 896
             hints->contours = NULL;
    
    897 897
     
    
    898
    -      new_max = ( new_max + 3 ) & ~3U; /* round up to a multiple of 4 */
    
    898
    +      new_max = ( new_max + 3 ) & ~3; /* round up to a multiple of 4 */
    
    899 899
     
    
    900 900
           if ( FT_RENEW_ARRAY( hints->contours, old_max, new_max ) )
    
    901 901
             goto Exit;
    
    902 902
     
    
    903
    -      hints->max_contours = (FT_Int)new_max;
    
    903
    +      hints->max_contours = new_max;
    
    904 904
         }
    
    905 905
     
    
    906 906
         /*
    
    ... ... @@ -908,8 +908,8 @@
    908 908
          * note that we reserve two additional point positions, used to
    
    909 909
          * hint metrics appropriately
    
    910 910
          */
    
    911
    -    new_max = (FT_UInt)( outline->n_points + 2 );
    
    912
    -    old_max = (FT_UInt)hints->max_points;
    
    911
    +    new_max = outline->n_points + 2;
    
    912
    +    old_max = hints->max_points;
    
    913 913
     
    
    914 914
         if ( new_max <= AF_POINTS_EMBEDDED )
    
    915 915
         {
    
    ... ... @@ -924,12 +924,12 @@
    924 924
           if ( hints->points == hints->embedded.points )
    
    925 925
             hints->points = NULL;
    
    926 926
     
    
    927
    -      new_max = ( new_max + 2 + 7 ) & ~7U; /* round up to a multiple of 8 */
    
    927
    +      new_max = ( new_max + 2 + 7 ) & ~7; /* round up to a multiple of 8 */
    
    928 928
     
    
    929 929
           if ( FT_RENEW_ARRAY( hints->points, old_max, new_max ) )
    
    930 930
             goto Exit;
    
    931 931
     
    
    932
    -      hints->max_points = (FT_Int)new_max;
    
    932
    +      hints->max_points = new_max;
    
    933 933
         }
    
    934 934
     
    
    935 935
         hints->num_points   = outline->n_points;
    


  • reply via email to

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