Merge pull request #3680 from maxGimeno/Ipelets-Fix_warning-GF

Fix warnings in testsuite
This commit is contained in:
Laurent Rineau 2019-02-16 14:00:18 +01:00
commit 4ef0c123d3
4 changed files with 24 additions and 25 deletions

View File

@ -66,20 +66,20 @@ namespace CGAL{
ipe::TSelect get_selection_type() const { return get_IpePage()->primarySelection()==-1 ? ipe::EPrimarySelected : ipe::ESecondarySelected;}
//ipe6 compatibility
void transform_selected_objects_(const IpeMatrix& tfm) const {
for (int i=0;i<get_IpePage()->count();++i)
for (int i=0;i<static_cast<int>(get_IpePage()->count());++i)
if (get_IpePage()->select(i)!=ipe::ENotSelected)
get_IpePage()->transform(i,tfm);
}
void delete_selected_objects_() const {
for (unsigned i=get_IpePage()->count();i>0;--i)
for (unsigned i=static_cast<unsigned>(get_IpePage()->count());i>0;--i)
if (get_IpePage()->select(i-1)!=ipe::ENotSelected)
get_IpePage()->remove(i-1);
}
void group_selected_objects_() const {
ipe::Group* grp=new ipe::Group();
for (unsigned i=get_IpePage()->count();i>0;--i)
for (unsigned i=static_cast<unsigned>(get_IpePage()->count());i>0;--i)
if (get_IpePage()->select(i-1)!=ipe::ENotSelected){
grp->push_back( get_IpePage()->object(i-1)->clone() );
//~ grp->push_back( get_IpePage()->object(i-1) );
@ -276,7 +276,7 @@ public:
return Iso_rectangle_2();
}
for (int i=0;i<get_IpePage()->count();++i){
for (int i=0;i<static_cast<int>(static_cast<int>(get_IpePage()->count()));++i){
if (get_IpePage()->select(i)==ipe::ENotSelected)
continue;
@ -308,7 +308,7 @@ public:
create_polygon_with_holes(bool delete_underlying_polygons=false) const
{
std::list<ipe::SubPath*> SSPqu;
for (int i=0;i<get_IpePage()->count();++i){
for (int i=0;i<static_cast<int>(get_IpePage()->count());++i){
if (get_IpePage()->select(i)!=ipe::ENotSelected && get_IpePage()->object(i)->asPath()->shape().subPath(0)->closed() ){
ipe::SubPath* ssp=new ipe::Curve(*get_IpePage()->object(i)->asPath()->shape().subPath(0)->asCurve());
SSPqu.push_back(ssp);
@ -329,7 +329,7 @@ public:
{
ipe::Vector paper_size=get_paper_size();
ipe::Matrix tfm (1,0,0,1,paper_size.x/2.,paper_size.y/2.);
for (int i=0;i<get_IpePage()->count();++i)
for (int i=0;i<static_cast<int>(get_IpePage()->count());++i)
if (get_IpePage()->select(i)!=ipe::ENotSelected )
get_IpePage()->transform(i,tfm);
}

View File

@ -135,6 +135,8 @@ Segment_2_Line_2_pair<K>::intersection_type() const
case Line_2_Line_2_pair<K>::LINE:
_result = SEGMENT;
break;
default:
CGAL_assume(false);
}
return _result;
}

View File

@ -301,21 +301,24 @@ no_topological_change__without_set_point(
cj->set_facet_visited(mj);
Vertex_handle v1 = c->vertex(j);
typedef typename Tr::Triangulation_data_structure TDS;
typedef typename TDS::Cell_range Cell_range;
typedef typename TDS::Vertex_range Vertex_range;
if(tr.is_infinite(v1))
{
// Build a copy of c, and replace V0 by a temporary vertex (position "p")
typename Cell_handle::value_type c_copy (*c);
Cell_range::Time_stamper_impl::initialize_time_stamp(&c_copy);
int i_v0;
typename Vertex_handle::value_type v;
Vertex_range::Time_stamper_impl::initialize_time_stamp(&v);
if (c_copy.has_vertex(v0, i_v0))
{
v.set_point(p);
c_copy.set_vertex(i_v0,
Tr::Triangulation_data_structure::Vertex_range::s_iterator_to(v));
c_copy.set_vertex(i_v0, Vertex_range::s_iterator_to(v));
}
Cell_handle c_copy_h =
Tr::Triangulation_data_structure::Cell_range::s_iterator_to(c_copy);
Cell_handle c_copy_h = Cell_range::s_iterator_to(c_copy);
if(tr.side_of_power_sphere(c_copy_h, pg(cj->vertex(mj)), false)
!= CGAL::ON_UNBOUNDED_SIDE)
{
@ -327,17 +330,17 @@ no_topological_change__without_set_point(
{
// Build a copy of cj, and replace V0 by a temporary vertex (position "p")
typename Cell_handle::value_type cj_copy (*cj);
Cell_range::Time_stamper_impl::initialize_time_stamp(&cj_copy);
int i_v0;
typename Vertex_handle::value_type v;
Vertex_range::Time_stamper_impl::initialize_time_stamp(&v);
if (cj_copy.has_vertex(v0, i_v0))
{
v.set_point(p);
cj_copy.set_vertex(i_v0,
Tr::Triangulation_data_structure::Vertex_range::s_iterator_to(v));
cj_copy.set_vertex(i_v0, Vertex_range::s_iterator_to(v));
}
Cell_handle cj_copy_h =
Tr::Triangulation_data_structure::Cell_range::s_iterator_to(cj_copy);
Cell_handle cj_copy_h = Cell_range::s_iterator_to(cj_copy);
if(tr.side_of_power_sphere(cj_copy_h, pg(v1), false)
!= CGAL::ON_UNBOUNDED_SIDE)
{

View File

@ -81,15 +81,13 @@ bool partition_appx_cvx_cuts_nonconvex_angle( Edge_circulator e_circ,
const Traits& traits)
{
typedef typename Triangulation::Segment Segment_2;
typedef typename Triangulation::Point Point;
#ifdef CGAL_PARTITION_APPROX_CONVEX_DEBUG
Segment_2 edge = triangles.segment((*e_circ).first, (*e_circ).second);
std::cout << "edge: " << *edge.source() << " " << *edge.target()
<< std::endl;
#endif
typename Triangulation::Point next_ccw_pt_ref, prev_ccw_pt_ref;
// the next and previous edges in the ccw ordering of edges around v_ref
Edge_circulator next_e = e_circ; next_e++;
Edge_circulator prev_e = e_circ; prev_e--;
@ -109,14 +107,10 @@ bool partition_appx_cvx_cuts_nonconvex_angle( Edge_circulator e_circ,
<< *prev_edge.target() <<std::endl;
#endif
// find which endpoint is shared by the two edges
if (next_edge.source() == v_ref)
next_ccw_pt_ref = next_edge.target();
else
next_ccw_pt_ref = next_edge.source();
if (prev_edge.source() == v_ref)
prev_ccw_pt_ref = prev_edge.target();
else
prev_ccw_pt_ref = prev_edge.source();
Point next_ccw_pt_ref =
(next_edge.source() == v_ref) ? next_edge.target() : next_edge.source();
Point prev_ccw_pt_ref =
(prev_edge.source() == v_ref) ? prev_edge.target() : prev_edge.source();
#ifdef CGAL_PARTITION_APPROX_CONVEX_DEBUG
std::cout << "partition_appx_cvx_cuts_nonconvex_angle: next_ccw_pt "