Commit ec6a45882133b0554c3c9ae6b1bec57cc835e5ec

Alexei Podtelezhnikov 2021-10-04T23:10:59

[pshinter] Additional clean-ups. * src/pshinter/pshalgo.h (psh_hint_table_find_strong_points): Streamline code. * src/pshinter/pshalgo.h (PSH_Glyph): Remove unused fields.

diff --git a/src/pshinter/pshalgo.c b/src/pshinter/pshalgo.c
index 22f3695..8632df6 100644
--- a/src/pshinter/pshalgo.c
+++ b/src/pshinter/pshalgo.c
@@ -1418,18 +1418,14 @@
 
     for ( ; count > 0; count--, point++ )
     {
-      PSH_Dir  point_dir = PSH_DIR_NONE;
-      FT_Pos   org_u     = point->org_u;
+      PSH_Dir  point_dir;
+      FT_Pos   org_u = point->org_u;
 
 
       if ( psh_point_is_strong( point ) )
         continue;
 
-      if ( point->dir_in & major_dir )
-        point_dir = point->dir_in;
-
-      else if ( point->dir_out & major_dir )
-        point_dir = point->dir_out;
+      point_dir = ( point->dir_in | point->dir_out ) & major_dir;
 
       if ( point_dir & ( PSH_DIR_DOWN | PSH_DIR_RIGHT ) )
       {
diff --git a/src/pshinter/pshalgo.h b/src/pshinter/pshalgo.h
index 609514b..999c601 100644
--- a/src/pshinter/pshalgo.h
+++ b/src/pshinter/pshalgo.h
@@ -195,10 +195,6 @@ FT_BEGIN_HEADER
     PSH_Globals        globals;
     PSH_Hint_TableRec  hint_tables[2];
 
-    FT_Bool            vertical;
-    FT_Int             major_dir;
-    FT_Int             minor_dir;
-
     FT_Bool            do_horz_hints;
     FT_Bool            do_vert_hints;
     FT_Bool            do_horz_snapping;