From 832b0a69e8efea32de28f44d098df6275f0310ee Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Wed, 16 Nov 2022 09:46:50 +0100 Subject: [PATCH] Fixed warnings --- src/libslic3r/Measure.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libslic3r/Measure.cpp b/src/libslic3r/Measure.cpp index 4e3bcaa82..ffb8f953a 100644 --- a/src/libslic3r/Measure.cpp +++ b/src/libslic3r/Measure.cpp @@ -291,14 +291,14 @@ void MeasuringImpl::extract_features() // point happened to be inside the segment. The discrimination of too small segments // will follow, so we need a complete picture before that. if (circles_idxs.size() > 1 - && circles_idxs.back().second == angles.size()-1 + && circles_idxs.back().second == (int)angles.size()-1 && circles_idxs.front().first == 0) { // Possibly the same circle. Check that the angle and length criterion holds along the combined segment. bool same = true; double last_len = -1.; double last_angle = 0.; for (int i=circles_idxs.back().first + 1; i != circles_idxs.front().second; ++i) { - if (i == angles.size()) + if (i == (int)angles.size()) i = 1; if (last_len == -1.) { last_len = lengths[i]; @@ -347,12 +347,12 @@ void MeasuringImpl::extract_features() for (int i=int(circles_idxs.size())-1; i>=0; --i) { const auto& [start, end] = circles_idxs[i]; int N = start >= 0 - ? end - start + (start == 0 && end == border.size()-1 ? 0 : 1) // last point is the same as first + ? end - start + (start == 0 && end == (int)border.size()-1 ? 0 : 1) // last point is the same as first : end + (border.size() + start); if (N < 5) { circles.erase(circles.begin() + i); circles_idxs.erase(circles_idxs.begin() + i); - } else if (N <= 8 && start == 0 && end == border.size()-1) { + } else if (N <= 8 && start == 0 && end == (int)border.size()-1) { // This is a regular 5-8 polygon. Add the edges as edges with a special // point and remove the circle. Leave the indices in circles_idxs, so // the edges are not picked up again later.