Skip to content

Commit

Permalink
More missing headers and compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
e-n-f committed Nov 9, 2023
1 parent 690738b commit 3f98aa9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion clip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ drawvec clean_or_clip_poly(drawvec &geom, int z, int buffer, bool clip, bool try
if (k != i) {
fprintf(f, ",");
}
fprintf(f, "[%lld,%lld]", geom[k].x, geom[k].y);
fprintf(f, "[%lld,%lld]", (long long) geom[k].x, (long long) geom[k].y);
}

fprintf(f, "]");
Expand Down
5 changes: 3 additions & 2 deletions polygon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <algorithm>
#include <set>
#include <vector>
#include <cmath>
#include "geometry.hpp"

struct point {
Expand Down Expand Up @@ -192,11 +193,11 @@ drawvec clean_polygon(drawvec const &geom, int z, int detail) {
}

for (size_t k = i; k + 1 < j; k++) {
std::pair<point, point> segment = std::make_pair(
std::pair<point, point> seg = std::make_pair(
point(geom[k].x / scale, geom[k].y / scale),
point(geom[k + 1].x / scale, geom[k + 1].y / scale));

segments.push_back(segment);
segments.push_back(seg);
}

i = j - 1;
Expand Down

0 comments on commit 3f98aa9

Please sign in to comment.