diff options
author | Hein-Pieter van Braam <hp@tmm.cx> | 2018-07-26 01:26:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-26 01:26:46 +0200 |
commit | 832e2bfcd38965a01a9149d509169dd197e42f58 (patch) | |
tree | 18b7ff35f1eeee39031a16e9c1d834ebf03d44cf /core/math/delaunay.h | |
parent | 9423f23ffb80c946dec380f73f3f313ec44d0d18 (diff) | |
parent | 0e29f7974b59e4440cf02e1388fb9d8ab2b5c5fd (diff) |
Merge pull request #20137 from hpvb/reduce-vector-cow
Reduce unnecessary COW on Vector by make writing explicit
Diffstat (limited to 'core/math/delaunay.h')
-rw-r--r-- | core/math/delaunay.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/math/delaunay.h b/core/math/delaunay.h index 09aebc773f..13fbc0c6ae 100644 --- a/core/math/delaunay.h +++ b/core/math/delaunay.h @@ -92,7 +92,7 @@ public: for (int j = 0; j < triangles.size(); j++) { if (circum_circle_contains(points, triangles[j], i)) { - triangles[j].bad = true; + triangles.write[j].bad = true; polygon.push_back(Edge(triangles[j].points[0], triangles[j].points[1])); polygon.push_back(Edge(triangles[j].points[1], triangles[j].points[2])); polygon.push_back(Edge(triangles[j].points[2], triangles[j].points[0])); @@ -109,8 +109,8 @@ public: for (int j = 0; j < polygon.size(); j++) { for (int k = j + 1; k < polygon.size(); k++) { if (edge_compare(points, polygon[j], polygon[k])) { - polygon[j].bad = true; - polygon[k].bad = true; + polygon.write[j].bad = true; + polygon.write[k].bad = true; } } } |