From 45a72e8dd22b1971b12d41e178bcff062dca679b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 26 Jul 2023 16:42:07 +0200 Subject: [PATCH] Use FT weights from the start --- .../Straight_skeleton_2/include/CGAL/input_helpers.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/include/CGAL/input_helpers.h b/Straight_skeleton_2/examples/Straight_skeleton_2/include/CGAL/input_helpers.h index 35077e38c2e..ad41ff7a91f 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/include/CGAL/input_helpers.h +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/include/CGAL/input_helpers.h @@ -204,7 +204,7 @@ void generate_random_weights(const PolygonWithHoles& p, using Container = typename std::remove_reference::type; using Iterator = typename Container::const_iterator; - std::map weight; + std::map weight; // start somewhere not collinear Iterator start_it; @@ -238,7 +238,7 @@ void generate_random_weights(const PolygonWithHoles& p, else { CGAL_assertion(weight.count(it) == 0); - weight[it] = rnd.get_double(min_weight, max_weight); + weight[it] = FT(rnd.get_double(min_weight, max_weight)); } it = next(it, c); @@ -247,7 +247,7 @@ void generate_random_weights(const PolygonWithHoles& p, std::vector weights; for(auto it=c.begin(); it