changeset 172:61cbcc2e0b63

more performant contains
author Markus Kaiser <markus.kaiser@in.tum.de>
date Wed, 15 Jul 2015 15:33:25 +0200
parents 0f46c00d2ee6
children 4b88559a8b91
files src/powerdiagram/ConvexHullQhull.cpp
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/powerdiagram/ConvexHullQhull.cpp	Wed Jul 15 15:33:03 2015 +0200
+++ b/src/powerdiagram/ConvexHullQhull.cpp	Wed Jul 15 15:33:25 2015 +0200
@@ -82,7 +82,7 @@
         // Add the facet
         for (auto& vertex : facet.vertices()) {
             const auto id = vertex.point().id(qhull.runId());
-            if (vertexMap.count(id) <= 0) {
+            if (vertexMap.find(id) == vertexMap.end()) {
                 vertexMap[id] = lattice.addMinimal(points[id]);
             }
 
@@ -107,7 +107,7 @@
 
                 for (auto& vertex : ridge.vertices()) {
                     const auto id = vertex.point().id(qhull.runId());
-                    if (vertexMap.count(id) <= 0) {
+                    if (vertexMap.find(id) == vertexMap.end()) {
                         vertexMap[id] = lattice.addMinimal(points[id]);
                     }