From e1cd919ea49823a662b094426a682a9dc7538276 Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Mon, 15 Mar 2021 09:36:12 +0100 Subject: [PATCH] Fix warnings --- Orthtree/examples/Orthtree/octree_build_with_custom_split.cpp | 2 +- Orthtree/include/CGAL/Orthtree.h | 2 +- Orthtree/include/CGAL/Orthtree/Node.h | 2 +- Orthtree/test/Orthtree/test_octree_kernels.cpp | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Orthtree/examples/Orthtree/octree_build_with_custom_split.cpp b/Orthtree/examples/Orthtree/octree_build_with_custom_split.cpp index 8b7c846f5ec..c3fd1bef1cd 100644 --- a/Orthtree/examples/Orthtree/octree_build_with_custom_split.cpp +++ b/Orthtree/examples/Orthtree/octree_build_with_custom_split.cpp @@ -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; diff --git a/Orthtree/include/CGAL/Orthtree.h b/Orthtree/include/CGAL/Orthtree.h index 4783324d7e3..a9422be1b4b 100644 --- a/Orthtree/include/CGAL/Orthtree.h +++ b/Orthtree/include/CGAL/Orthtree.h @@ -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 diff --git a/Orthtree/include/CGAL/Orthtree/Node.h b/Orthtree/include/CGAL/Orthtree/Node.h index b06d9469cd5..c55b8472e80 100644 --- a/Orthtree/include/CGAL/Orthtree/Node.h +++ b/Orthtree/include/CGAL/Orthtree/Node.h @@ -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; diff --git a/Orthtree/test/Orthtree/test_octree_kernels.cpp b/Orthtree/test/Orthtree/test_octree_kernels.cpp index c29c524733b..58d49eb4fcc 100644 --- a/Orthtree/test/Orthtree/test_octree_kernels.cpp +++ b/Orthtree/test/Orthtree/test_octree_kernels.cpp @@ -11,7 +11,6 @@ void test() typedef typename Kernel::Point_3 Point; typedef CGAL::Point_set_3 Point_set; typedef CGAL::Octree Octree; - typedef typename Octree::Node Node; Point_set points; CGAL::Random_points_in_cube_3 generator;