From 1a07d25cc3b5c26ce1892267dce98541573f41f7 Mon Sep 17 00:00:00 2001 From: Sven Oesau Date: Mon, 6 Oct 2025 16:06:42 +0200 Subject: [PATCH] fixing some conversion warnings --- .../include/CGAL/Compact_container_with_index.h | 2 +- .../include/CGAL/Kinetic_surface_reconstruction_3.h | 4 ++-- .../Kinetic_surface_reconstruction_plugin.cpp | 4 ++-- ...approximated_centroidal_Voronoi_diagram_remeshing.h | 10 +++++----- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Combinatorial_map/include/CGAL/Compact_container_with_index.h b/Combinatorial_map/include/CGAL/Compact_container_with_index.h index 7395743edb0..308261a0001 100644 --- a/Combinatorial_map/include/CGAL/Compact_container_with_index.h +++ b/Combinatorial_map/include/CGAL/Compact_container_with_index.h @@ -453,7 +453,7 @@ public: // Constructor allowing to transform an index from one container to another template - Index_for_cc_with_index(const Index2& idx): m_idx(static_cast(idx)) + Index_for_cc_with_index(const Index2& idx): m_idx(static_cast(idx)) {} /// Increment the internal index. This operations does not diff --git a/Kinetic_surface_reconstruction/include/CGAL/Kinetic_surface_reconstruction_3.h b/Kinetic_surface_reconstruction/include/CGAL/Kinetic_surface_reconstruction_3.h index 221a3fa4683..5873b7df672 100644 --- a/Kinetic_surface_reconstruction/include/CGAL/Kinetic_surface_reconstruction_3.h +++ b/Kinetic_surface_reconstruction/include/CGAL/Kinetic_surface_reconstruction_3.h @@ -1365,8 +1365,8 @@ private: CGAL_assertion_code(auto it =) va2vh.insert(std::make_pair(polygons[i][j], vertices.size() - 1)); CGAL_assertion(it.second || it.first->first == polygons[i][j]); - vertices.back()->info().i = i; - vertices.back()->info().j = j; + vertices.back()->info().i = static_cast(i); + vertices.back()->info().j = static_cast(j); vertices.back()->info().p = pl.to_2d(m_lcc.point(m_lcc.template dart_of_attribute<0>(polygons[i][j]))); vertices.back()->info().dh = polygons[i][j]; diff --git a/Lab/demo/Lab/Plugins/Point_set/Kinetic_surface_reconstruction_plugin.cpp b/Lab/demo/Lab/Plugins/Point_set/Kinetic_surface_reconstruction_plugin.cpp index 9ef3b7a5f0c..4fa74390627 100644 --- a/Lab/demo/Lab/Plugins/Point_set/Kinetic_surface_reconstruction_plugin.cpp +++ b/Lab/demo/Lab/Plugins/Point_set/Kinetic_surface_reconstruction_plugin.cpp @@ -298,7 +298,7 @@ private Q_SLOTS: std::size_t max_depth = m_ksr->estimate_max_subdivision_depth(); dock_widget->partReorientCheck->setChecked(true); dock_widget->partSubdivisionCheck->setChecked(true); - dock_widget->partMaxDepthBox->setValue(max_depth); + dock_widget->partMaxDepthBox->setValue(static_cast(max_depth)); dock_widget->partPolygonsPerNodeBox->setValue(40); dock_widget->partKBox->setValue(2); } @@ -591,7 +591,7 @@ private: m_ksr->estimate_detection_parameters(max_distance, max_angle, min_region_size); dock_widget->sdMaxDistanceBox->setValue(max_distance); dock_widget->sdMaxAngleBox->setValue(max_angle); - dock_widget->sdMinRegionSizeBox->setValue(min_region_size); + dock_widget->sdMinRegionSizeBox->setValue(static_cast(min_region_size)); dock_widget->sdkNeighborsBox->setValue(12); dock_widget->srCoplanarityCheck->setChecked(true); dock_widget->srMaxOffsetBox->setValue(max_distance * 0.5); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/approximated_centroidal_Voronoi_diagram_remeshing.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/approximated_centroidal_Voronoi_diagram_remeshing.h index 7ac21d5019d..2bfbe49cf65 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/approximated_centroidal_Voronoi_diagram_remeshing.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/approximated_centroidal_Voronoi_diagram_remeshing.h @@ -651,7 +651,7 @@ acvd_impl(TriangleMesh& tmesh, int vi; vertex_descriptor vd; do { - vi = rnd.get_int(0, nb_vertices); + vi = rnd.get_int(0, static_cast(nb_vertices)); vd = *std::next(vertices(tmesh).begin(), vi); } while (get(vertex_cluster_pmap, vd) != -1); @@ -1105,7 +1105,7 @@ acvd_impl(TriangleMesh& tmesh, std::size_t cb = points.size() - 1; if (cb_first == -1) - cb_first = cb; + cb_first = static_cast(cb); std::size_t ct_mapped = valid_cluster_map[ct], cs_mapped = valid_cluster_map[cs]; @@ -1276,8 +1276,8 @@ acvd_impl(TriangleMesh& tmesh, if (clusters[c].nb_vertices == 1) continue; - put(vertex_cluster_pmap, v, clusters.size()); - CGAL_assertion(get(vertex_cluster_pmap, v) == (int) clusters.size()); + put(vertex_cluster_pmap, v, static_cast(clusters.size())); + CGAL_assertion(get(vertex_cluster_pmap, v) == static_cast(clusters.size())); clusters.emplace_back(); } @@ -1291,7 +1291,7 @@ acvd_impl(TriangleMesh& tmesh, for (std::size_t nmi : one_ring) frozen_clusters[nmi] = false; - nb_clusters = clusters.size(); + nb_clusters = static_cast(clusters.size()); frozen_clusters.resize(nb_clusters, false); nb_loops = 0; qem_energy_minimization = false;