fixing some conversion warnings

This commit is contained in:
Sven Oesau 2025-10-06 16:06:42 +02:00
parent f77f06eede
commit 1a07d25cc3
4 changed files with 10 additions and 10 deletions

View File

@ -453,7 +453,7 @@ public:
// Constructor allowing to transform an index from one container to another
template<typename Index2>
Index_for_cc_with_index(const Index2& idx): m_idx(static_cast<size_t>(idx))
Index_for_cc_with_index(const Index2& idx): m_idx(static_cast<size_type>(idx))
{}
/// Increment the internal index. This operations does not

View File

@ -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<int>(i);
vertices.back()->info().j = static_cast<int>(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];

View File

@ -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<int>(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<int>(min_region_size));
dock_widget->sdkNeighborsBox->setValue(12);
dock_widget->srCoplanarityCheck->setChecked(true);
dock_widget->srMaxOffsetBox->setValue(max_distance * 0.5);

View File

@ -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<int>(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<int>(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<int>(clusters.size()));
CGAL_assertion(get(vertex_cluster_pmap, v) == static_cast<int>(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<int>(clusters.size());
frozen_clusters.resize(nb_clusters, false);
nb_loops = 0;
qem_energy_minimization = false;