freetype-commit
[Top][All Lists]
Advanced

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

[freetype2] master d102a51 1/2: [pshinter] Remove unnecessary check.


From: Werner Lemberg
Subject: [freetype2] master d102a51 1/2: [pshinter] Remove unnecessary check.
Date: Sun, 3 Oct 2021 22:49:31 -0400 (EDT)

branch: master
commit d102a514382a84810d5fa0d89426c6670e58038a
Author: Alexei Podtelezhnikov <apodtele@gmail.com>
Commit: Alexei Podtelezhnikov <apodtele@gmail.com>

    [pshinter] Remove unnecessary check.
    
    * src/pshinter/pshalgo.c (psh_hint_table_find_strong_points): Do not
    check if direction is defined before checking how.
---
 src/pshinter/pshalgo.c | 55 ++++++++++++++++++++++++--------------------------
 1 file changed, 26 insertions(+), 29 deletions(-)

diff --git a/src/pshinter/pshalgo.c b/src/pshinter/pshalgo.c
index 05f91aa..8edda27 100644
--- a/src/pshinter/pshalgo.c
+++ b/src/pshinter/pshalgo.c
@@ -1434,46 +1434,43 @@
       else if ( PSH_DIR_COMPARE( point->dir_out, major_dir ) )
         point_dir = point->dir_out;
 
-      if ( point_dir )
+      if ( point_dir == major_dir )
       {
-        if ( point_dir == major_dir )
-        {
-          FT_UInt  nn;
+        FT_UInt  nn;
 
 
-          for ( nn = 0; nn < num_hints; nn++ )
-          {
-            PSH_Hint  hint = sort[nn];
-            FT_Pos    d    = org_u - hint->org_pos;
+        for ( nn = 0; nn < num_hints; nn++ )
+        {
+          PSH_Hint  hint = sort[nn];
+          FT_Pos    d    = org_u - hint->org_pos;
 
 
-            if ( d < threshold && -d < threshold )
-            {
-              psh_point_set_strong( point );
-              point->flags2 |= PSH_POINT_EDGE_MIN;
-              point->hint    = hint;
-              break;
-            }
+          if ( d < threshold && -d < threshold )
+          {
+            psh_point_set_strong( point );
+            point->flags2 |= PSH_POINT_EDGE_MIN;
+            point->hint    = hint;
+            break;
           }
         }
-        else if ( point_dir == -major_dir )
-        {
-          FT_UInt  nn;
+      }
+      else if ( point_dir == -major_dir )
+      {
+        FT_UInt  nn;
 
 
-          for ( nn = 0; nn < num_hints; nn++ )
-          {
-            PSH_Hint  hint = sort[nn];
-            FT_Pos    d    = org_u - hint->org_pos - hint->org_len;
+        for ( nn = 0; nn < num_hints; nn++ )
+        {
+          PSH_Hint  hint = sort[nn];
+          FT_Pos    d    = org_u - hint->org_pos - hint->org_len;
 
 
-            if ( d < threshold && -d < threshold )
-            {
-              psh_point_set_strong( point );
-              point->flags2 |= PSH_POINT_EDGE_MAX;
-              point->hint    = hint;
-              break;
-            }
+          if ( d < threshold && -d < threshold )
+          {
+            psh_point_set_strong( point );
+            point->flags2 |= PSH_POINT_EDGE_MAX;
+            point->hint    = hint;
+            break;
           }
         }
       }



reply via email to

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