Skip to content

Commit

Permalink
Merge pull request #7561 from afabri/SLS-warnings-GF
Browse files Browse the repository at this point in the history
SLS: Fix warnings
  • Loading branch information
lrineau committed Sep 7, 2023
2 parents 4692334 + 45a72e8 commit bf027d4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <CGAL/boost/graph/IO/polygon_mesh_io.h>
#include <CGAL/Polygon_2.h>
#include <CGAL/Real_timer.h>
#include <CGAL/Random.h>

#include <iostream>
#include <unordered_map>
Expand Down Expand Up @@ -61,7 +62,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)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ void generate_random_weights(const PolygonWithHoles& p,
using Container = typename std::remove_reference<decltype(c)>::type;
using Iterator = typename Container::const_iterator;

std::map<Iterator, std::size_t /*rnd weight*/> weight;
std::map<Iterator, FT> weight;

// start somewhere not collinear
Iterator start_it;
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ int main(int argc, char** argv)

int hole_n = (argc > 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);

Expand Down

0 comments on commit bf027d4

Please sign in to comment.