From 3f98aa96b29777f86f04c548e0cd3be987414698 Mon Sep 17 00:00:00 2001 From: Erica Fischer Date: Thu, 9 Nov 2023 09:16:28 -0800 Subject: [PATCH] More missing headers and compiler warnings --- clip.cpp | 2 +- polygon.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/clip.cpp b/clip.cpp index 512ab2fd..e61d1221 100644 --- a/clip.cpp +++ b/clip.cpp @@ -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, "]"); diff --git a/polygon.cpp b/polygon.cpp index bc2292e3..bad6b457 100644 --- a/polygon.cpp +++ b/polygon.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include "geometry.hpp" struct point { @@ -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 segment = std::make_pair( + std::pair 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;