Fix some errors and warnings

This commit is contained in:
Andreas Fabri 2024-04-02 18:57:11 +01:00
parent fa11cf6fce
commit e63550d503
7 changed files with 14 additions and 18 deletions

View File

@ -320,7 +320,7 @@ public:
using Segment_2 = typename Traits::Segment_2;
using Segment_3 = typename Traits::Segment_3;
using Color = CGAL::Color;
using Color = CGAL::IO::Color;
using Surface_mesh = CGAL::Surface_mesh<Point_3>;
using Random = CGAL::Random;

View File

@ -117,7 +117,7 @@ template<typename ResultType, typename Type1, typename Type2>
inline const ResultType intersection(const Type1& t1, const Type2& t2) {
ResultType out;
const bool is_intersection_found = intersection(t1, t2, out);
CGAL_assertion_code(const bool is_intersection_found =) intersection(t1, t2, out);
CGAL_assertion(is_intersection_found);
return out;
}

View File

@ -39,10 +39,10 @@ public:
typedef typename Kernel::Segment_2 Segment_2;
typedef Support_line<Kernel> Support_line_DS;
typedef Segment Segment;
typedef Vertex<FT> Vertex;
typedef Meta_vertex<Point_2> Meta_vertex;
typedef CGAL::KSP_2::internal::Vertex<FT> Vertex;
typedef CGAL::KSP_2::internal::Segment Segment;
typedef CGAL::KSP_2::internal::Meta_vertex<Point_2> Meta_vertex;
typedef std::vector<Support_line_DS> Support_lines;
typedef std::vector<Segment> Segments;
@ -573,9 +573,6 @@ public:
< position_of_meta_vertex_on_support_line(b, support_line_idx));
});
std::size_t nb_segments_before = m_segments.size();
std::size_t nb_vertices_before = m_vertices.size();
// Attach to existing endpoint
std::size_t new_target_idx = m_vertices.size();
m_vertices.push_back(Vertex(position_of_meta_vertex_on_support_line(meta_vertices_idx.front(),

View File

@ -34,7 +34,7 @@ public:
typedef GeomTraits Kernel;
typedef typename Kernel::FT FT;
typedef Event<GeomTraits> Event;
typedef CGAL::KSP_2::internal::Event<GeomTraits> Event;
private:

View File

@ -816,7 +816,7 @@ public:
const bool is_inserted = pair.second;
if (is_inserted) {
typename Intersection_kernel::Line_3 line;
bool intersect = intersection(plane, m_support_planes[common_bbox_plane_idx].exact_plane(), line);
CGAL_assertion_code(bool intersect =) intersection(plane, m_support_planes[common_bbox_plane_idx].exact_plane(), line);
CGAL_assertion(intersect);
pair.first->second = m_intersection_graph.add_line(line);
}
@ -1251,7 +1251,7 @@ public:
typename Intersection_kernel::Line_3 line;
auto it = support_planes_idx.begin();
bool intersect = intersection(m_support_planes[*it++].exact_plane(), m_support_planes[*it++].exact_plane(), line);
CGAL_assertion_code(bool intersect =) intersection(m_support_planes[*it++].exact_plane(), m_support_planes[*it++].exact_plane(), line);
CGAL_assertion(intersect);
std::size_t line_idx = m_intersection_graph.add_line(line);

View File

@ -192,8 +192,8 @@ private:
// Loop complete, connecting face with all edges.
for (IEdge edge : face.edges) {
m_data.support_plane(sp_idx).add_neighbor(edge, face_idx);
IFace f1 = m_data.support_plane(sp_idx).iface(edge);
IFace f2 = m_data.support_plane(sp_idx).other(edge, f1);
CGAL_assertion_code(IFace f1 = m_data.support_plane(sp_idx).iface(edge);)
CGAL_assertion_code(IFace f2 = m_data.support_plane(sp_idx).other(edge, f1);)
CGAL_assertion(f1 == face_idx || f2 == face_idx);
}
@ -590,14 +590,14 @@ private:
}
}
if (!outside) {
if (face == -1)
if (face == IFace(-1))
face = f;
else {
std::cout << "Two faces found for " << sp_idx << " sp, f1 " << face << " f2 " << f << std::endl;
}
}
}
if (face != -1) {
if (face != IFace(-1)) {
if (!m_data.igraph().face(face).part_of_partition) {
auto pface = m_data.add_iface_to_mesh(sp_idx, face);
sp.data().initial_ifaces.push_back(face);

View File

@ -150,8 +150,7 @@ public:
static_cast<FT>(point.y()),
static_cast<FT>(point.z())));
}
const std::size_t n = points.size();
CGAL_assertion(n == polygon.size());
CGAL_assertion(points.size() == polygon.size());
From_exact from_exact;
@ -232,7 +231,7 @@ public:
from_exact(point.y()),
from_exact(point.z())));
}
const std::size_t n = points.size();
CGAL_assertion_code(const std::size_t n = points.size();)
CGAL_assertion(n == polygon.size());
CGAL_assertion(n != 0);