From 7f7e2efefc63be0a5e37bf83fbcf9b3b5b08db62 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 29 Jun 2023 11:05:13 +0100 Subject: [PATCH] SLS: Fix warnings --- .../examples/Straight_skeleton_2/extrude_skeleton.cpp | 3 ++- .../examples/Straight_skeleton_2/include/CGAL/input_helpers.h | 2 +- .../test_sls_weighted_polygons_with_holes.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/extrude_skeleton.cpp b/Straight_skeleton_2/examples/Straight_skeleton_2/extrude_skeleton.cpp index 073b50964c0..0be087a09eb 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/extrude_skeleton.cpp +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/extrude_skeleton.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include @@ -62,7 +63,7 @@ int main(int argc, char** argv) // below is only used for random weight generation double min_weight = 1., max_weight = 10.; - int seed = std::time(nullptr); + int seed = CGAL::get_default_random().get_seed(); for(int i = 1; i < argc; ++i) { 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 b42c29df4a4..35077e38c2e 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 @@ -247,7 +247,7 @@ void generate_random_weights(const PolygonWithHoles& p, std::vector weights; for(auto it=c.begin(); it 1) ? std::atoi(argv[1]) : 2; int hole_nv = (argc > 2) ? std::atoi(argv[2]) : 10; - int seed = (argc > 3) ? std::atoi(argv[3]) : std::time(nullptr); + int seed = (argc > 3) ? std::atoi(argv[3]) : CGAL::get_default_random().get_seed(); CGAL::Random rnd(seed);