From b3a7e2464a5e5e33d0a0f09177bbb3b9287229d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Bartoletti?= Date: Tue, 14 Nov 2023 15:43:29 +0100 Subject: [PATCH] Fix clang-tidy check: clang-analyzer-security.insecureAPI.mktemp --- src/algorithm/straightSkeleton.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/algorithm/straightSkeleton.cpp b/src/algorithm/straightSkeleton.cpp index 25e88705..3246ec9f 100644 --- a/src/algorithm/straightSkeleton.cpp +++ b/src/algorithm/straightSkeleton.cpp @@ -98,12 +98,12 @@ straightSkeletonToMultiLineString(const CGAL::Straight_skeleton_2 &ss, auto angle(const Point &a, const Point &b, const Point &c) -> double { - Point const ab(to_double(b.x() - a.x()), to_double(b.y() - a.y())); - Point const cb(to_double(b.x() - c.x()), to_double(b.y() - c.y())); + Point const ab(CGAL::to_double(b.x() - a.x()), CGAL::to_double(b.y() - a.y())); + Point const cb(CGAL::to_double(b.x() - c.x()), CGAL::to_double(b.y() - c.y())); - double const dot = (to_double(ab.x() * cb.x() + ab.y() * cb.y())); /* dot product */ + double const dot = (CGAL::to_double(ab.x() * cb.x() + ab.y() * cb.y())); /* dot product */ double const cross = - (to_double(ab.x() * cb.y() - ab.y() * cb.x())); /* cross product */ + (CGAL::to_double(ab.x() * cb.y() - ab.y() * cb.x())); /* cross product */ double const alpha = std::atan2(cross, dot); @@ -422,7 +422,7 @@ extrudeStraightSkeleton(const Geometry &g, double building_height, double roof_height) -> std::unique_ptr { - std::unique_ptr roof{ + std::unique_ptr const roof{ extrudeStraightSkeleton(g, roof_height)}; translate(*roof, 0.0, 0.0, building_height); std::unique_ptr building(extrude(g.as(), building_height));