From c59202788a92b2bf72afe6a64ab3a302382fa4a3 Mon Sep 17 00:00:00 2001 From: Erica Fischer Date: Fri, 10 Nov 2023 12:35:56 -0800 Subject: [PATCH] Remove debug spew --- polygon.cpp | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/polygon.cpp b/polygon.cpp index bb7e1f48c..b6523aa87 100644 --- a/polygon.cpp +++ b/polygon.cpp @@ -286,11 +286,6 @@ struct scan_transition { }; void snap_round(std::vector &segs) { - for (auto const &seg : segs) { - printf("before snap round %f,%f to %f,%f\n", seg.first.x, seg.first.y, - seg.second.x, seg.second.y); - } - bool again = true; while (again) { @@ -387,17 +382,9 @@ drawvec reassemble(std::vector const &segs) { for (auto const &seg : segs) { connections.emplace(seg.first, seg); - - printf("initial %f,%f to %f,%f\n", seg.first.x, seg.first.y, - seg.second.x, seg.second.y); } while (connections.size() > 0) { - for (auto const &s : connections) { - printf("starting from %f,%f to %f,%f\n", s.second.first.x, s.second.first.y, - s.second.second.x, s.second.second.y); - } - // arbitrarily choose a starting point, // and walk the connections from there until // we find a point that we have already visited. @@ -449,24 +436,12 @@ drawvec reassemble(std::vector const &segs) { examined.emplace(here.first, here); ring.push_back(here.first); - printf("looking for %f,%f to %f,%f\n", - here.first.x, here.first.y, - here.second.x, here.second.y); - for (auto const &s : connections) { - printf("in %f,%f to %f,%f\n", s.second.first.x, s.second.first.y, - s.second.second.x, s.second.second.y); - } - // find the initial segment in `connections` so we can remove it auto initial = connections.equal_range(here.first); bool found = false; for (; initial.first != initial.second; ++initial.first) { - printf("looking at %f,%f to %f,%f\n", - initial.first->second.first.x, initial.first->second.first.y, - initial.first->second.second.x, initial.first->second.second.y); if (initial.first->second == here) { connections.erase(initial.first); - printf("there it is\n"); found = true; break; } @@ -476,11 +451,6 @@ drawvec reassemble(std::vector const &segs) { exit(EXIT_IMPOSSIBLE); } - for (auto const &s : connections) { - printf("now looking in %f,%f to %f,%f\n", s.second.first.x, s.second.first.y, - s.second.second.x, s.second.second.y); - } - while (examined.find(here.second) == examined.end()) { auto options = connections.equal_range(here.second); if (options.first == options.second) {