Address warnings about comparing signed/unsigned integers.

This commit is contained in:
Joseph Lenox 2017-09-28 22:20:30 -05:00
parent 90f66ea9b9
commit e9c0c93ff1
2 changed files with 3 additions and 3 deletions

View File

@ -89,7 +89,7 @@ LayerRegion::process_external_surfaces()
// (thus not visible from the outside), like a slab sustained by
// pillars, include them in the bridge in order to have better and
// more continuous bridging.
for (int i = 0; i < surfaces[j].expolygon.holes.size(); ++i) {
for (size_t i = 0; i < surfaces[j].expolygon.holes.size(); ++i) {
// reverse the hole and consider it a polygon
Polygon h = surfaces[j].expolygon.holes[i];
h.reverse();
@ -97,7 +97,7 @@ LayerRegion::process_external_surfaces()
// Is this hole fully contained in the layer slices?
if (diff(h, this->layer()->slices).empty()) {
// remove any other surface contained in this hole
for (int k = 0; k < surfaces.size(); ++k) {
for (size_t k = 0; k < surfaces.size(); ++k) {
if (k == j) continue;
if (h.contains(surfaces[k].expolygon.contour.first_point())) {
surfaces.erase(surfaces.begin() + k);

View File

@ -215,7 +215,7 @@ PerimeterGenerator::process()
// find the contour loop that contains it
for (int t = d-1; t >= 0; --t) {
for (int j = 0; j < contours[t].size(); ++j) {
for (size_t j = 0; j < contours[t].size(); ++j) {
PerimeterGeneratorLoop &candidate_parent = contours[t][j];
if (candidate_parent.polygon.contains(loop.polygon.first_point())) {
candidate_parent.children.push_back(loop);