From 628578c6558abe6e1106f7d23e6466c06b9ce153 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Sun, 11 Jan 2015 08:53:31 +0100 Subject: [PATCH] * src/truetype/ttinterp.c (Ins_SxVTL): Simplify function call. --- ChangeLog | 4 ++++ src/truetype/ttinterp.c | 29 +++++++++++++++-------------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 755db2c90..8b3fe5fea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2015-01-11 Werner Lemberg + + * src/truetype/ttinterp.c (Ins_SxVTL): Simplify function call. + 2015-01-11 Werner Lemberg * src/truetype/ttinterp.c (Normalize): Remove unused argument. diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c index f35c5c6e9..b530ec8ea 100644 --- a/src/truetype/ttinterp.c +++ b/src/truetype/ttinterp.c @@ -2629,13 +2629,14 @@ Ins_SxVTL( TT_ExecContext exc, FT_UShort aIdx1, FT_UShort aIdx2, - FT_Int aOpc, FT_UnitVector* Vec ) { FT_Long A, B, C; FT_Vector* p1; FT_Vector* p2; + FT_Byte opcode = exc->opcode; + if ( BOUNDS( aIdx1, exc->zp2.n_points ) || BOUNDS( aIdx2, exc->zp1.n_points ) ) @@ -2658,11 +2659,11 @@ if ( A == 0 && B == 0 ) { - A = 0x4000; - aOpc = 0; + A = 0x4000; + opcode = 0; } - if ( ( aOpc & 1 ) != 0 ) + if ( ( opcode & 1 ) != 0 ) { C = B; /* counter clockwise rotation */ B = A; @@ -2701,7 +2702,8 @@ Ins_SxyTCA( TT_ExecContext exc ) { FT_Short AA, BB; - FT_Byte opcode = exc->opcode; + + FT_Byte opcode = exc->opcode; AA = (FT_Short)( ( opcode & 1 ) << 14 ); @@ -2743,7 +2745,6 @@ if ( Ins_SxVTL( exc, (FT_UShort)args[1], (FT_UShort)args[0], - exc->opcode, &exc->GS.projVector ) == SUCCESS ) { exc->GS.dualVector = exc->GS.projVector; @@ -2766,7 +2767,6 @@ if ( Ins_SxVTL( exc, (FT_UShort)args[1], (FT_UShort)args[0], - exc->opcode, &exc->GS.freeVector ) == SUCCESS ) { GUESS_VECTOR( projVector ); @@ -4988,7 +4988,8 @@ { FT_Long A, B, C; FT_UShort p1, p2; /* was FT_Int in pas type ERROR */ - FT_Int aOpc = exc->opcode; + + FT_Byte opcode = exc->opcode; p1 = (FT_UShort)args[1]; @@ -5017,12 +5018,12 @@ if ( A == 0 && B == 0 ) { - A = 0x4000; - aOpc = 0; + A = 0x4000; + opcode = 0; } } - if ( ( aOpc & 1 ) != 0 ) + if ( ( opcode & 1 ) != 0 ) { C = B; /* counter clockwise rotation */ B = A; @@ -5041,12 +5042,12 @@ if ( A == 0 && B == 0 ) { - A = 0x4000; - aOpc = 0; + A = 0x4000; + opcode = 0; } } - if ( ( aOpc & 1 ) != 0 ) + if ( ( opcode & 1 ) != 0 ) { C = B; /* counter clockwise rotation */ B = A;