Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions Arrangement_on_surface_2/include/CGAL/Arr_tags.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ struct Get_left_side_category< Traits_, false > {

template < class Traits_ >
struct Arr_complete_left_side_category {
public:
npublic:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure this is not compiling.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 That cannot compile! Please Michael, you have to fix that file.

typedef Traits_ Traits;

typedef typename
Expand All @@ -90,7 +90,7 @@ struct Validate_left_side_category< GeometryTraits_2, false > {
void missing__Left_side_category()
{
T
missing__Left_side_category__assuming__Arr_oblivious_side_tag__instead;
missing__Left_side_category__assuming__Arr_oblivious_side_tag__instead __attribute__((unused));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think __attribute__ is defined on MSCV?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In <CGAL/config.h>, we have a macro CGAL_UNUSED that can be used. Its value is __attribute__ ((__unused__)) for gcc and clang, and empty for other compilers.

}
};

Expand Down Expand Up @@ -137,7 +137,7 @@ struct Validate_bottom_side_category< GeometryTraits_2, false > {
void missing__Bottom_side_category()
{
T
missing__Bottom_side_category__assuming__Arr_oblivious_side_tag__instead;
missing__Bottom_side_category__assuming__Arr_oblivious_side_tag__instead __attribute__((unused));
}
};

Expand Down Expand Up @@ -182,7 +182,7 @@ struct Validate_top_side_category< GeometryTraits_2, false > {
template <typename T>
void missing__Top_side_category()
{
T missing__Top_side_category__assuming__Arr_oblivious_side_tag__instead;
T missing__Top_side_category__assuming__Arr_oblivious_side_tag__instead __attribute__((unused));
}
};

Expand Down Expand Up @@ -229,7 +229,7 @@ struct Validate_right_side_category< GeometryTraits_2, false > {
void missing__Right_side_category()
{
T
missing__Right_side_category__assuming__Arr_oblivious_side_tag__instead;
missing__Right_side_category__assuming__Arr_oblivious_side_tag__instead __attribute__((unused));
}
};

Expand Down Expand Up @@ -643,4 +643,3 @@ struct Arr_all_sides_category {
} // namespace CGAL

#endif

7 changes: 6 additions & 1 deletion Generator/include/CGAL/Random_polygon_2_sweep.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,12 @@ template <class ForwardIterator, class PolygonTraits>
bool Less_segments<ForwardIterator, PolygonTraits>::
operator()(Vertex_index i, Vertex_index j)
{
if (m_vertex_data->edges[j.as_int()].is_in_tree) {
if (i.as_int() == j.as_int()) {
// Some STL implementations may call comparator(x, x)
// to verify irreflexivity. Don't violate less_than_in_tree's
// preconditions in such an environment.
return false;
} else if (m_vertex_data->edges[j.as_int()].is_in_tree) {
return less_than_in_tree(i,j);
} else {
return !less_than_in_tree(j,i);
Expand Down
2 changes: 2 additions & 0 deletions Mesh_2/include/CGAL/Delaunay_mesher_2.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ class Delaunay_mesher_2
edges_level(tr, clusters_, null_level),
faces_level(tr, criteria, edges_level),
visitor(faces_level, edges_level, null_visitor),
seeds_mark(false),
initialized(false)
{
}
Expand All @@ -94,6 +95,7 @@ class Delaunay_mesher_2
edges_level(edges_level_),
faces_level(tr, criteria, edges_level),
visitor(faces_level, null_visitor),
seeds_mark(false),
initialized(false)
{
}
Expand Down
4 changes: 4 additions & 0 deletions Nef_2/include/CGAL/Nef_2/PM_const_decorator.h
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,10 @@ check_integrity_and_topological_planarity(bool faces) const
std::size_t e_num = number_of_edges();
std::size_t c_num = number_of_connected_components() - iso_vert_num;
std::size_t f_num = number_of_face_cycles() - c_num + 1;
/* Suppress unused-variable warnings when assertions are disabled. */
(void)v_num;
(void)e_num;
(void)f_num;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use CGAL_USE macro instead.

CGAL_NEF_TRACEV(fc_num);CGAL_NEF_TRACEV(iv_num);CGAL_NEF_TRACEV(iso_vert_num);
CGAL_NEF_TRACEV(v_num);CGAL_NEF_TRACEV(e_num);CGAL_NEF_TRACEV(c_num);CGAL_NEF_TRACEV(f_num);
// CGAL_assertion(fc_num == f_num && iv_num == iso_vert_num);
Expand Down
3 changes: 3 additions & 0 deletions Number_types/include/CGAL/MP_Float_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ template < typename T >
inline
void MP_Float::construct_from_builtin_fp_type(T d)
{
// Fix "...::exp is used uninitialized" errors.
exp = 0;

if (d == 0)
return;

Expand Down
7 changes: 6 additions & 1 deletion Polygon/include/CGAL/Polygon_2/Polygon_2_simplicity.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,12 @@ template <class VertexData>
bool Less_segments<VertexData>::
operator()(Vertex_index i, Vertex_index j)
{
if (m_vertex_data->edges[j.as_int()].is_in_tree) {
if (i.as_int() == j.as_int()) {
// Some STL implementations may call comparator(x, x)
// to verify irreflexivity. Don't violate less_than_in_tree's
// preconditions in such an environment.
return false;
} else if (m_vertex_data->edges[j.as_int()].is_in_tree) {
return less_than_in_tree(i,j);
} else {
return !less_than_in_tree(j,i);
Expand Down