Skip to content

Commit c535478

Browse files
committed
Fixed additional bugs in clipper.triangulation.cpp
1 parent 150bbf9 commit c535478

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

CPP/Clipper2Lib/src/clipper.triangulation.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ namespace Clipper2Lib
678678
if (!eBelow) return nullptr; // oops!!
679679

680680
// get the best vertex from 'eBelow'
681-
Vertex2* vBest = (eBelow->vT->pt.y <= yAbove) ? eBelow->vB : vBest = eBelow->vT;
681+
Vertex2* vBest = (eBelow->vT->pt.y <= yAbove) ? eBelow->vB : eBelow->vT;
682682
int64_t xBest = vBest->pt.x;
683683
int64_t yBest = vBest->pt.y;
684684

@@ -970,7 +970,7 @@ namespace Clipper2Lib
970970
// That's why this line is necessary (and why we can't use an iterator).
971971
// Also, it is safe to use a descending index into the array because
972972
// any additions don't need to be re-processed within this loop.
973-
if (i >= v->edges.size()) continue;
973+
if (i >= static_cast<int>(v->edges.size())) continue;
974974

975975
Edge* e = v->edges[i];
976976
if (EdgeCompleted(e) || IsLooseEdge(*e)) continue;
@@ -1145,7 +1145,7 @@ namespace Clipper2Lib
11451145
allVertices.reserve(allVertices.capacity() + total_vertex_count);
11461146
allEdges.reserve(allEdges.capacity() + total_vertex_count);
11471147

1148-
for (const Path64 path : paths)
1148+
for (const Path64& path : paths)
11491149
AddPath(path);
11501150
return (allVertices.size() > 2);
11511151
}

0 commit comments

Comments
 (0)