Fix warnings

This commit is contained in:
Simon Giraudot 2017-01-05 07:57:05 +01:00
parent f9dcc4b721
commit 7bcb5b02eb
5 changed files with 9 additions and 8 deletions

View File

@ -59,7 +59,7 @@ int main (int, char**)
ransac.add_shape_factory<Sphere>();
Efficient_ransac::Parameters parameters;
parameters.probability = 0.05;
parameters.min_points = point_set.size() / 3.;
parameters.min_points = std::size_t(point_set.size() / 3);
parameters.epsilon = 0.01;
parameters.cluster_epsilon = 0.5;
parameters.normal_threshold = 0.9;

View File

@ -1,5 +1,6 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Point_set_3.h>
#include <CGAL/Random.h>
#include <fstream>
#include <limits>
@ -35,8 +36,6 @@ void print_point_set (const Point_set& point_set)
int main (int, char**)
{
srand (time (NULL));
Point_set point_set;
Color black = {{ 0, 0, 0 }};
@ -53,10 +52,10 @@ int main (int, char**)
point_set.reserve (10); // For memory optimization
for (std::size_t i = 0; i < 10; ++ i)
{
Point_set::iterator it = point_set.insert (Point (i, i, i));
Color c = {{ (unsigned char)(rand() % 256),
(unsigned char)(rand() % 256),
(unsigned char)(rand() % 256) }};
Point_set::iterator it = point_set.insert (Point (double(i), double(i), double(i)));
Color c = {{ (unsigned char)(CGAL::get_default_random().get_int(0, 255)),
(unsigned char)(CGAL::get_default_random().get_int(0, 255)),
(unsigned char)(CGAL::get_default_random().get_int(0, 255)) }};
color[*it] = c;
intensity[*it] = rand() / (double)(RAND_MAX);
}

View File

@ -59,6 +59,7 @@ private:
struct Abstract_ply_property_to_point_set_property
{
virtual ~Abstract_ply_property_to_point_set_property() { }
virtual void assign (Ply_reader& reader, typename Point_set::Index index) = 0;
};

View File

@ -216,6 +216,7 @@ namespace internal
class Abstract_property_printer
{
public:
virtual ~Abstract_property_printer() { }
virtual std::string get_string(const typename CGAL::Point_set_3<Point,Vector>::Index& index) = 0;
};

View File

@ -47,7 +47,7 @@ int main (int, char**)
ps1.add_normal_map();
for (std::size_t i = 0; i < 5; ++ i)
ps1.insert (Point (i, i, i), Vector (i, i, i));
ps1.insert (Point (double(i), double(i), double(i)), Vector (double(i), double(i), double(i)));
ps1.remove (ps1.end() - 3);