Using iterator pattern instead of List::Element *.

Co-authored-by: Adam Scott <ascott.ca@gmail.com>
This commit is contained in:
Yyf2333
2025-02-03 14:16:27 +08:00
committed by Yufeng Ying
parent 594d64ec24
commit 22b5ec17fb
36 changed files with 150 additions and 173 deletions

View File

@@ -396,9 +396,7 @@ void NavigationPolygon::make_polygons_from_outlines() {
vertices.clear();
HashMap<Vector2, int> points;
for (List<TPPLPoly>::Element *I = out_poly.front(); I; I = I->next()) {
TPPLPoly &tp = I->get();
for (const TPPLPoly &tp : out_poly) {
Vector<int> p;
for (int64_t i = 0; i < tp.GetNumPoints(); i++) {