summaryrefslogtreecommitdiffstats
path: root/geometry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'geometry.cpp')
-rw-r--r--geometry.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/geometry.cpp b/geometry.cpp
index 7f6bb6c..0967119 100644
--- a/geometry.cpp
+++ b/geometry.cpp
@@ -71,10 +71,10 @@ void simplifyPolygon(const Polygon *in, const Rectangle *rect, Polygon *out) {
simplifyVertex(&v, &in->back(), rect);
out->push_back(v);
- for(Polygon::const_iterator it = in->begin(); it != in->end(); it++) {
- Polygon::const_iterator it2 = it+1;
- if(it2 == in->end()) it2 = in->begin();
+ for(Polygon::const_iterator v2 = in->begin(); v2 != in->end(); v2++) {
+ Polygon::const_iterator v3 = v2+1;
+ if(v3 == in->end()) v3 = in->begin();
- addSimplifiedLine(&*it, &*it2, rect, (it2 == in->begin()), out);
+ addSimplifiedLine(&*v2, &*v3, rect, (v3 == in->begin()), out);
}
}