From 7c7982d9f3e5dfed120f610cce1382b2402c5f77 Mon Sep 17 00:00:00 2001 From: ntfshard Date: Sun, 30 Aug 2015 04:06:37 +0300 Subject: [PATCH] Fix signed-unsigned compare --- xs/src/libslic3r/ClipperUtils.cpp | 2 +- xs/src/libslic3r/TriangleMesh.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xs/src/libslic3r/ClipperUtils.cpp b/xs/src/libslic3r/ClipperUtils.cpp index 3d07891b1..f18653702 100644 --- a/xs/src/libslic3r/ClipperUtils.cpp +++ b/xs/src/libslic3r/ClipperUtils.cpp @@ -685,7 +685,7 @@ SV* polynode_children_2_perl(const ClipperLib::PolyNode& node) { AV* av = newAV(); - const unsigned int len = node.ChildCount(); + const int len = node.ChildCount(); if (len > 0) av_extend(av, len-1); for (int i = 0; i < len; ++i) { av_store(av, i, polynode2perl(*node.Childs[i])); diff --git a/xs/src/libslic3r/TriangleMesh.cpp b/xs/src/libslic3r/TriangleMesh.cpp index 6e2f56312..743bf4584 100644 --- a/xs/src/libslic3r/TriangleMesh.cpp +++ b/xs/src/libslic3r/TriangleMesh.cpp @@ -429,7 +429,7 @@ void TriangleMesh::ReadFromPerl(SV* vertices, SV* facets) // read geometry AV* vertices_av = (AV*)SvRV(vertices); - for (unsigned int i = 0; i < stl.stats.number_of_facets; i++) { + for (int i = 0; i < stl.stats.number_of_facets; i++) { AV* facet_av = (AV*)SvRV(*av_fetch(facets_av, i, 0)); stl_facet facet; facet.normal.x = 0;