fixes after the testsuite

This commit is contained in:
Andreas Fabri 2018-01-25 08:44:16 +00:00
parent 4ef0bdbcb6
commit 939da7ca04
17 changed files with 57 additions and 30 deletions

View File

@ -1126,10 +1126,10 @@ private:
CGAL_assertion(n == new_info_container.size());
//iterate through the vector and update
// (-1 stands for "multiplicity unknown")
for(size_type i=0;i<n;i++) {
for(std::size_t i=0;i<n;i++) {
std::size_t m = old_info_container[i].size();
CGAL_assertion(m == new_info_container[i].size());
for(size_type j=0;j<m;j++) {
for(std::size_t j=0;j<m;j++) {
old_info_container[i][j].mult
= (std::max)(new_info_container[i][j].mult,
old_info_container[i][j].mult);

View File

@ -115,11 +115,12 @@ public:
Md_point_location pl(result);
std::size_t number_of_surfaces = surfaces.size();
int j;
std::size_t j;
std::list<X_monotone_curve_2> curves_col;
std::list<Point_2> points_col;
typename std::list<Curve_2>::iterator boundary_it;
for(int i=0; i<number_of_surfaces; ++i)
for(std::size_t i=0; i<number_of_surfaces; ++i)
{
Xy_monotone_surface_3 &cur_surface = surfaces[i];
// first insert all the projected curves of the boundary of the current surface
@ -152,7 +153,7 @@ public:
// we collect all intersections and use sweep to insert them
Point_2 point;
Intersection_curve curve;
for(unsigned int k=0; k<inter_objs.size(); ++k)
for(std::size_t k=0; k<inter_objs.size(); ++k)
{
cur_obj = inter_objs[k];
assert(!cur_obj.is_empty());
@ -209,7 +210,7 @@ public:
// first we find the surfaces that are defined over the vertex
std::list<Xy_monotone_surface_3> defined_surfaces;
typename Traits::Is_defined_over is_defined_over = traits.is_defined_over_object();
for(int i=0; i<number_of_surfaces; ++i)
for(std::size_t i=0; i<number_of_surfaces; ++i)
if (is_defined_over(vh->point(), surfaces[i]))
defined_surfaces.push_back(surfaces[i]);
@ -224,7 +225,7 @@ public:
Halfedge_handle hh = hi;
// first we find the surfaces that are defined over the egde
std::list<Xy_monotone_surface_3> defined_surfaces;
for(int i=0; i<number_of_surfaces; ++i)
for(std::size_t i=0; i<number_of_surfaces; ++i)
if (is_surface_defined_over_edge(hh, surfaces[i]))
defined_surfaces.push_back(surfaces[i]);
@ -247,7 +248,7 @@ public:
Face_handle fh = fi;
// first we find the surfaces that are defined over the face
std::list<Xy_monotone_surface_3> defined_surfaces;
for (int i=0; i<number_of_surfaces; ++i)
for (std::size_t i=0; i<number_of_surfaces; ++i)
if (is_surface_defined_over_face(fh, surfaces[i]))
defined_surfaces.push_back(surfaces[i]);

View File

@ -14,7 +14,7 @@
#include <map>
#ifdef _MSC_VER
#pragma warning(disable:4355) // complaint about using 'this' to
#pragma warning(disable: 4127 4355) // complaint about using 'this' to
// initialize a member
#endif

View File

@ -21,6 +21,9 @@
#ifndef CGAL_KINETIC_NOTIFYING_TABLE_BASE_3_H
#define CGAL_KINETIC_NOTIFYING_TABLE_BASE_3_H
#include <CGAL/disable_warnings.h>
#include <CGAL/Kinetic/basic.h>
#include <CGAL/Tools/Label.h>
#include <CGAL/Kinetic/Ref_counted.h>
@ -374,4 +377,6 @@ inline std::istream &operator>>(std::istream &in, Active_objects_vector<V> &v) {
# pragma warning(pop)
#endif
#include <CGAL/enable_warnings.h>
#endif

View File

@ -21,6 +21,9 @@
#ifndef CGAL_KINETIC_SIMULATOR_BASE_H_
#define CGAL_KINETIC_SIMULATOR_BASE_H_
#include <CGAL/disable_warnings.h>
#include <CGAL/Kinetic/basic.h>
#include <CGAL/Kinetic/Heap_pointer_event_queue.h>
#include <vector>
@ -735,4 +738,7 @@ CGAL_OUTPUT2(Default_simulator)
} } //namespace CGAL::Kinetic
#include <CGAL/enable_warnings.h>
#endif

View File

@ -23,6 +23,8 @@
#define CGAL_KINETIC_KINETIC_DELAUNAY_2_H
#include <CGAL/Kinetic/basic.h>
#include <CGAL/disable_warnings.h>
#include <CGAL/Delaunay_triangulation_2.h>
#include <CGAL/Kinetic/Delaunay_triangulation_face_base_2.h>
#include <CGAL/Kinetic/Delaunay_triangulation_vertex_base_2.h>
@ -528,7 +530,7 @@ public:
if (!was_2d && del_.dimension()==2) {
vh->set_neighbors(del_.degree(vh));
vh->set_neighbors(static_cast<int>(del_.degree(vh)));
has_certificates_=false;
set_has_certificates(true, 0);
} else if (del_.dimension() == 2) {
@ -570,7 +572,7 @@ public:
}
}
} else {
vertex_handle(k)->set_neighbors(del_.degree(vh));
vertex_handle(k)->set_neighbors(static_cast<int>(del_.degree(vh)));
}
watcher_.post_insert_vertex(vh);
//write(std::cout);
@ -804,7 +806,7 @@ protected:
}
void update_neighbors(Vertex_handle vh) {
unsigned int deg= del_.degree(vh);
unsigned int deg = static_cast<unsigned int>(del_.degree(vh));
if (deg == vh->neighbors()) return;
if (deg ==3) {
vh->set_neighbors(3);
@ -1183,4 +1185,7 @@ void Delaunay_triangulation_2<Sim, Del, W, T>::audit() const
}
} } //namespace CGAL::Kinetic
#include <CGAL/enable_warnings.h>
#endif

View File

@ -22,6 +22,8 @@
#ifndef CGAL_KINETIC_KINETIC_DELAUNAY_3_H
#define CGAL_KINETIC_KINETIC_DELAUNAY_3_H
#include <CGAL/disable_warnings.h>
#include <CGAL/Kinetic/basic.h>
#include <CGAL/Kinetic/internal/Delaunay_triangulation_base_3.h>
@ -41,11 +43,6 @@
#include <CGAL/Kinetic/listeners.h>
#include <CGAL/Kinetic/Delaunay_triangulation_visitor_base_3.h>
#if defined(BOOST_MSVC)
# pragma warning(push)
# pragma warning(disable:4355) // complaint about using 'this' to
#endif // initialize a member
namespace CGAL { namespace Kinetic { namespace internal {
template <class Traits>
@ -222,8 +219,6 @@ public:
} } //namespace CGAL::Kinetic
#if defined(BOOST_MSVC)
# pragma warning(pop)
#endif
#include <CGAL/enable_warnings.h>
#endif

View File

@ -20,6 +20,9 @@
#ifndef CGAL_KINETIC_KINETIC_REGULAR_TRIANGULATION_3_H
#define CGAL_KINETIC_KINETIC_REGULAR_TRIANGULATION_3_H
#include <CGAL/disable_warnings.h>
#include <CGAL/basic.h>
#include <CGAL/Regular_triangulation_3.h>
@ -35,10 +38,6 @@
#include <CGAL/use.h>
#include <CGAL/assertions.h>
#if defined(BOOST_MSVC)
# pragma warning(push)
# pragma warning(disable:4355) // complaint about using 'this' to
#endif // initialize a member
namespace CGAL { namespace Kinetic { namespace internal {
@ -1188,8 +1187,6 @@ std::ostream &operator<<(std::ostream &out, const Regular_triangulation_3<Traits
} } //namespace CGAL::Kinetic
#if defined(BOOST_MSVC)
# pragma warning(pop)
#endif
#include <CGAL/enable_warnings.h>
#endif // CGAL_KINETIC_KINETIC_REGULAR_TRIANGULATION_3_H

View File

@ -21,6 +21,9 @@
#ifndef CGAL_KINETIC_BIN_QUEUE_H
#define CGAL_KINETIC_BIN_QUEUE_H
#include <CGAL/disable_warnings.h>
#include <CGAL/Kinetic/basic.h>
#include <iostream>
#include <CGAL/Kinetic/internal/debug_counters.h>
@ -1021,6 +1024,7 @@ std::ostream &operator<<(std::ostream &out, const Two_list_pointer_event_queue<D
return out;
}
#include <CGAL/enable_warnings.h>
} } //namespace CGAL::Kinetic
#endif

View File

@ -388,7 +388,7 @@ public:
coefs_[pow]=coef;
//std::cout << "Read " << coefs_[pow] << std::endl;
char n= in.peek();
char n= static_cast<char>(in.peek());
if (n=='+' || n=='-') {
pos= (n!='-');
char e;

View File

@ -21,6 +21,9 @@
#ifndef CGAL_POLYNOMIAL_SIMPLE_INTERVAL_ROOT_H
#define CGAL_POLYNOMIAL_SIMPLE_INTERVAL_ROOT_H
#include <CGAL/disable_warnings.h>
#include <CGAL/Polynomial/basic.h>
#include <CGAL/Real_embeddable_traits.h>
#include <vector>
@ -739,4 +742,7 @@ namespace std
static const float_round_style round_stype = round_toward_zero;
};
}
#include <CGAL/enable_warnings.h>
#endif

View File

@ -9,6 +9,8 @@
#include <algorithm>
#include <iterator>
#include <CGAL/disable_warnings.h>
int main(int argc, char *argv[])
{

View File

@ -6,6 +6,8 @@
#include <limits>
#include <CGAL/Kinetic/Exact_simulation_traits.h>
#include <CGAL/disable_warnings.h>
template <class NT>
void check_nt(NT v) {
NT zero(0);

View File

@ -22,7 +22,7 @@ P rp(CGAL::Random &rand, int deg) {
int main(int, char *[]) {
CGAL::Random r(time(NULL));
CGAL::Random r;
int which = r.get_int(0,4);
double nump= r.get_int(25,50);

View File

@ -11,6 +11,8 @@
#include <algorithm>
#include <iterator>
#include <CGAL/disable_warnings.h>
int main(int argc, char *argv[])
{
if (0) {

View File

@ -9,6 +9,8 @@
#include <algorithm>
#include <iterator>
#include <CGAL/disable_warnings.h>
int main(int, char *[])
{

View File

@ -793,7 +793,7 @@ int test_zone ( Zone& rZone )
{
if ( sOffsetAtEntry.size() > 0 )
{
std::size_t lSize = std::distance(lTimes.begin(),lTimes.end());
std::ptrdiff_t lSize = std::distance(lTimes.begin(),lTimes.end());
for ( std::vector<int>::const_iterator oi = sOffsetAtEntry.begin() ; oi != sOffsetAtEntry.end() ; ++ oi )
{