diff options
author | Vinson Lee <[email protected]> | 2009-12-23 14:43:53 -0800 |
---|---|---|
committer | Vinson Lee <[email protected]> | 2009-12-23 14:43:53 -0800 |
commit | 15ecd0337e4e4d9d33449bdff014a634e368c7d6 (patch) | |
tree | 34886fc829d80f3c05fabdeaf88ef3bf209c59be /src/gallium/state_trackers/vega/arc.c | |
parent | 1b0ab3e3c9bd1a57069657bf5126ade2d8d44d30 (diff) |
st/vega: Move declaration outside for loop.
Diffstat (limited to 'src/gallium/state_trackers/vega/arc.c')
-rw-r--r-- | src/gallium/state_trackers/vega/arc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/vega/arc.c b/src/gallium/state_trackers/vega/arc.c index e74c7f03345..36cde7ab032 100644 --- a/src/gallium/state_trackers/vega/arc.c +++ b/src/gallium/state_trackers/vega/arc.c @@ -537,8 +537,9 @@ static INLINE int num_beziers_needed(struct arc *arc) double d_eta = (max_eta - min_eta) / n; if (d_eta <= 0.5 * M_PI) { double eta_b = min_eta; + int i; found = VG_TRUE; - for (int i = 0; found && (i < n); ++i) { + for (i = 0; found && (i < n); ++i) { double etaA = eta_b; eta_b += d_eta; found = (estimate_error(arc, etaA, eta_b) <= threshold); @@ -559,6 +560,7 @@ static void arc_to_beziers(struct arc *arc, sin_eta_b, a_cos_eta_b, b_sin_eta_b, a_sin_eta_b, b_cos_eta_b, x_b, y_b, x_b_dot, y_b_dot, lx, ly; double t, alpha; + int i; { /* always move to the start of the arc */ VGfloat x = arc->x1; @@ -607,7 +609,7 @@ static void arc_to_beziers(struct arc *arc, t = tan(0.5 * d_eta); alpha = sin(d_eta) * (sqrt(4 + 3 * t * t) - 1) / 3; - for (int i = 0; i < n; ++i) { + for (i = 0; i < n; ++i) { struct bezier bezier; double xA = x_b; double yA = y_b; |