From ef3d9867fcd859cbfa2e1d40619b4a2baad8b352 Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Tue, 23 Sep 2014 21:40:23 -0700 Subject: [PATCH] This can just be a regular loop now --- tile.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tile.cc b/tile.cc index 31deb0f..db7e5b7 100644 --- a/tile.cc +++ b/tile.cc @@ -98,10 +98,10 @@ int draw(struct draw *geom, int n, mapnik::vector::tile_feature *feature) { int cmd = -1; int length = 0; int drew = 0; - int i = 0; + int i; - while (i < n) { - int op = geom[i++].op; + for (i = 0; i < n; i++) { + int op = geom[i].op; if (op != cmd) { if (cmd_idx >= 0) { @@ -120,8 +120,8 @@ int draw(struct draw *geom, int n, mapnik::vector::tile_feature *feature) { } if (op == VT_MOVETO || op == VT_LINETO) { - long long wwx = geom[i - 1].x; - long long wwy = geom[i - 1].y; + long long wwx = geom[i].x; + long long wwy = geom[i].y; int dx = wwx - px; int dy = wwy - py;