Fix warnings

This commit is contained in:
Simon Giraudot 2021-03-15 09:36:12 +01:00
parent d58aa73857
commit e1cd919ea4
4 changed files with 3 additions and 4 deletions

View File

@ -48,7 +48,7 @@ int main(int argc, char **argv) {
Octree octree(points, points.point_map());
// Build the octree using our custom split predicate
octree.refine(Split_by_ratio(2.0));
octree.refine(Split_by_ratio(2));
// Print out the tree
std::cout << octree;

View File

@ -671,7 +671,7 @@ private: // functions :
[&](const Range_type &a) -> bool {
// This should be done with cartesian iterator but it seems
// complicated to do efficiently
return (get(m_point_map, a)[dimension] < center[dimension]);
return (get(m_point_map, a)[int(dimension)] < center[int(dimension)]);
});
// Further subdivide the first side of the split

View File

@ -475,7 +475,7 @@ public:
bool sign = direction[0];
// The first two bits indicate the dimension/axis (x, y, z)
uint8_t dimension = (direction >> 1).to_ulong();
uint8_t dimension = uint8_t((direction >> 1).to_ulong());
// Create an offset so that the bit-significance lines up with the dimension (e.g. 1, 2, 4 --> 001, 010, 100)
int8_t offset = (uint8_t) 1 << dimension;

View File

@ -11,7 +11,6 @@ void test()
typedef typename Kernel::Point_3 Point;
typedef CGAL::Point_set_3<Point> Point_set;
typedef CGAL::Octree<Kernel, Point_set, typename Point_set::Point_map> Octree;
typedef typename Octree::Node Node;
Point_set points;
CGAL::Random_points_in_cube_3<Point> generator;