Skip to content

Commit

Permalink
agg_font_freetype.cpp: avoid assigned value that is never used (CID 1…
Browse files Browse the repository at this point in the history
…503490)
  • Loading branch information
rouault committed May 22, 2021
1 parent 0e3e729 commit f28623a
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions renderers/agg/src/agg_font_freetype.cpp
Expand Up @@ -150,9 +150,6 @@ namespace mapserver
{
typedef typename PathStorage::value_type value_type;

FT_Vector v_last;
FT_Vector v_control;
FT_Vector v_start;
double x1, y1, x2, y2, x3, y3;

FT_Vector* point;
Expand All @@ -172,10 +169,9 @@ namespace mapserver
last = outline.contours[n];
limit = outline.points + last;

v_start = outline.points[first];
v_last = outline.points[last];
FT_Vector v_start = outline.points[first];

v_control = v_start;
FT_Vector v_control = v_start;

point = outline.points + first;
tags = outline.tags + first;
Expand All @@ -187,6 +183,8 @@ namespace mapserver
// check first point to determine origin
if( tag == FT_CURVE_TAG_CONIC)
{
const FT_Vector v_last = outline.points[last];

// first point is conic control. Yes, this happens.
if(FT_CURVE_TAG(outline.tags[last]) == FT_CURVE_TAG_ON)
{
Expand All @@ -201,8 +199,6 @@ namespace mapserver
// for closure
v_start.x = (v_start.x + v_last.x) / 2;
v_start.y = (v_start.y + v_last.y) / 2;

v_last = v_start;
}
point--;
tags--;
Expand Down

0 comments on commit f28623a

Please sign in to comment.