Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SLS: Fix warnings #7561

Merged
merged 2 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 <boost/shared_ptr.hpp>

Expand Down Expand Up @@ -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)
{
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 @@ -54,7 +54,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