From ab9c7cf51f8f4ca254c339982178aa0136c91d6e Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 7 Apr 2016 16:35:43 +0200 Subject: [PATCH] Replace static with CGAL_STATIC_THREAD_LOCAL_VARIABLE --- Triangulation/include/CGAL/Delaunay_triangulation.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Triangulation/include/CGAL/Delaunay_triangulation.h b/Triangulation/include/CGAL/Delaunay_triangulation.h index 21e0cc8d292..4110f990dda 100644 --- a/Triangulation/include/CGAL/Delaunay_triangulation.h +++ b/Triangulation/include/CGAL/Delaunay_triangulation.h @@ -20,6 +20,7 @@ #ifndef CGAL_DELAUNAY_COMPLEX_H #define CGAL_DELAUNAY_COMPLEX_H +#include #include #include #include @@ -779,10 +780,11 @@ typename Delaunay_triangulation::Vertex_handle Delaunay_triangulation ::insert_in_conflicting_cell(const Point & p, const Full_cell_handle s) { + // for storing conflicting full_cells. typedef std::vector Full_cell_h_vector; - static Full_cell_h_vector cs; // for storing conflicting full_cells. + CGAL_STATIC_THREAD_LOCAL_VARIABLE(Full_cell_h_vector,cs,0); cs.clear(); - // cs.reserve(64); + std::back_insert_iterator out(cs); Facet ft = compute_conflict_zone(p, s, out); return insert_in_hole(p, cs.begin(), cs.end(), ft);