mirror of https://github.com/CGAL/cgal
time to unsigned int conversion warnings fix
This commit is contained in:
parent
76feac2716
commit
b2d64c796c
|
|
@ -187,7 +187,7 @@ private:
|
|||
using Vertex_to_point_map = typename Region_type::Vertex_to_point_map;
|
||||
using Region_growing = CGAL::Shape_detection::Region_growing<Face_range, Neighbor_query, Region_type>;
|
||||
|
||||
CGAL::Random rand(time(0));
|
||||
CGAL::Random rand(static_cast<unsigned int>(time(0)));
|
||||
const SMesh& mesh = *(sm_item->polyhedron());
|
||||
scene->setSelectedItem(-1);
|
||||
const Face_range face_range = faces(mesh);
|
||||
|
|
@ -273,7 +273,7 @@ private:
|
|||
dialog.min_points();
|
||||
|
||||
// Get a point set.
|
||||
CGAL::Random rand(time(0));
|
||||
CGAL::Random rand(static_cast<unsigned int>(time(0)));
|
||||
Point_set* points = item->point_set();
|
||||
|
||||
scene->setSelectedItem(-1);
|
||||
|
|
@ -538,7 +538,7 @@ private:
|
|||
op.cluster_epsilon = dialog.cluster_epsilon(); // maximum euclidean distance between points to be clustered.
|
||||
op.normal_threshold = dialog.normal_tolerance(); // normal_threshold < dot(surface_normal, point_normal);
|
||||
|
||||
CGAL::Random rand(time(0));
|
||||
CGAL::Random rand(static_cast<unsigned int>(time(0)));
|
||||
// Gets point set
|
||||
Point_set* points = item->point_set();
|
||||
|
||||
|
|
@ -1049,7 +1049,7 @@ void Polyhedron_demo_point_set_shape_detection_plugin::build_alpha_shape
|
|||
|
||||
void Polyhedron_demo_point_set_shape_detection_plugin::on_actionEstimateParameters_triggered() {
|
||||
|
||||
CGAL::Random rand(time(0));
|
||||
CGAL::Random rand(static_cast<unsigned int>(time(0)));
|
||||
const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
|
||||
|
||||
Scene_points_with_normal_item* item =
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ int main(int argc, char *argv[]) {
|
|||
<< std::endl;
|
||||
|
||||
Pwc_vector pwc;
|
||||
srand(time(NULL));
|
||||
srand(static_cast<unsigned int>(time(NULL)));
|
||||
|
||||
// Iterate through all regions.
|
||||
for (const auto& region : regions) {
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ int main(int argc, char *argv[]) {
|
|||
using Face_index = typename Polygon_mesh::Face_index;
|
||||
|
||||
// Save the result to a file in the user-provided path if any.
|
||||
srand(time(NULL));
|
||||
srand(static_cast<unsigned int>(time(NULL)));
|
||||
if (argc > 2) {
|
||||
|
||||
bool created;
|
||||
|
|
|
|||
|
|
@ -530,7 +530,8 @@ namespace CGAL {
|
|||
bool done = false;
|
||||
do {
|
||||
do
|
||||
first_sample = get_default_random()(m_num_available_points);
|
||||
first_sample = get_default_random()(
|
||||
static_cast<unsigned int>(m_num_available_points));
|
||||
while (m_shape_index[first_sample] != -1);
|
||||
|
||||
done = m_global_octree->drawSamplesFromCellContainingPoint(
|
||||
|
|
@ -876,7 +877,8 @@ namespace CGAL {
|
|||
|
||||
private:
|
||||
int select_random_octree_level() {
|
||||
return (int) get_default_random()(m_global_octree->maxLevel() + 1);
|
||||
return (int) get_default_random()(
|
||||
static_cast<unsigned int>(m_global_octree->maxLevel() + 1));
|
||||
}
|
||||
|
||||
Shape* get_best_candidate(std::vector<Shape* >& candidates,
|
||||
|
|
|
|||
|
|
@ -501,7 +501,8 @@ namespace CGAL {
|
|||
int score = 0;
|
||||
std::vector<std::size_t> indices(num);
|
||||
for (std::size_t i = 0;i<num;i++)
|
||||
indices[i] = m_indices[get_default_random()(m_indices.size())];
|
||||
indices[i] = m_indices[get_default_random()(
|
||||
static_cast<unsigned int>(m_indices.size()))];
|
||||
|
||||
std::vector<FT> dists(num), angles(num);
|
||||
other->squared_distance(indices, dists);
|
||||
|
|
@ -515,7 +516,8 @@ namespace CGAL {
|
|||
return false;
|
||||
|
||||
for (std::size_t i = 0;i<num;i++)
|
||||
indices[i] = other->m_indices[get_default_random()(other->m_indices.size())];
|
||||
indices[i] = other->m_indices[get_default_random()(
|
||||
static_cast<unsigned int>(other->m_indices.size()))];
|
||||
|
||||
this->squared_distance(indices, dists);
|
||||
this->cos_to_normal(indices, angles);
|
||||
|
|
|
|||
Loading…
Reference in New Issue