From 592c47c549559659e5557c4306ef3919f0c8b745 Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Wed, 14 Oct 2015 12:24:18 -0700 Subject: [PATCH] Fix signedness warnings --- decode.cc | 2 +- geometry.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/decode.cc b/decode.cc index 692a4be..dc84b76 100644 --- a/decode.cc +++ b/decode.cc @@ -115,7 +115,7 @@ void handle(std::string message, int z, unsigned x, unsigned y) { printf("{ \"type\": \"Feature\""); printf(", \"properties\": { "); - for (unsigned t = 0; t + 1 < feat.tags_size(); t += 2) { + for (int t = 0; t + 1 < feat.tags_size(); t += 2) { if (t != 0) { printf(", "); } diff --git a/geometry.cc b/geometry.cc index 032f388..ed27fe4 100644 --- a/geometry.cc +++ b/geometry.cc @@ -331,7 +331,7 @@ static void decode_clipped(ClipperLib::PolyNode *t, drawvec &out) { // to do any outer-ring children of those children as a new top level. ClipperLib::Path p = t->Contour; - for (int i = 0; i < p.size(); i++) { + for (unsigned i = 0; i < p.size(); i++) { out.push_back(draw((i == 0) ? VT_MOVETO : VT_LINETO, p[i].X, p[i].Y)); } if (p.size() > 0) { @@ -340,7 +340,7 @@ static void decode_clipped(ClipperLib::PolyNode *t, drawvec &out) { for (int n = 0; n < t->ChildCount(); n++) { ClipperLib::Path p = t->Childs[n]->Contour; - for (int i = 0; i < p.size(); i++) { + for (unsigned i = 0; i < p.size(); i++) { out.push_back(draw((i == 0) ? VT_MOVETO : VT_LINETO, p[i].X, p[i].Y)); } if (p.size() > 0) {