Update branch from master after trailing whitespaces and tabs removal

This commit is contained in:
Sébastien Loriot 2020-03-26 19:25:47 +01:00
commit 38789af55d
16 changed files with 862 additions and 850 deletions

View File

@ -39,7 +39,7 @@ public:
typedef typename Algebraic_kernel_d_1::Algebraic_real_1 Algebraic_real_1; typedef typename Algebraic_kernel_d_1::Algebraic_real_1 Algebraic_real_1;
Bitstream_coefficient_kernel_at_alpha_rep() {} Bitstream_coefficient_kernel_at_alpha_rep() : _m_kernel(nullptr) {}
Bitstream_coefficient_kernel_at_alpha_rep(Algebraic_kernel_d_1* kernel, Bitstream_coefficient_kernel_at_alpha_rep(Algebraic_kernel_d_1* kernel,
Algebraic_real_1 alpha) Algebraic_real_1 alpha)

View File

@ -41,8 +41,8 @@ int main()
int n; int n;
is >> n; is >> n;
std::cout << "Reading " << n << " points " << std::endl; std::cout << "Reading " << n << " points " << std::endl;
Bare_point bp;
for( ; n>0 ; n--) { for( ; n>0 ; n--) {
Bare_point bp;
is >> bp; is >> bp;
Weighted_point p(bp, 0.0001 * random.get_double(0., 0.015625)); // arbitrary weights Weighted_point p(bp, 0.0001 * random.get_double(0., 0.015625)); // arbitrary weights
pts.push_back(p); pts.push_back(p);

View File

@ -60,7 +60,7 @@ private:
void Cone_spanners_ipelet::protected_run(int fn) void Cone_spanners_ipelet::protected_run(int fn)
{ {
std::vector<Point_2> lst; std::vector<Point_2> lst;
int number_of_cones; int number_of_cones = 0;
switch (fn){ switch (fn){
case 0: case 0:
case 1: case 1:

View File

@ -312,15 +312,12 @@ class ConicCPA2
PT center () const PT center () const
{ {
CGAL_kernel_precondition (type != PARABOLA); CGAL_kernel_precondition (type != PARABOLA);
// PT p;
// replaced previous line by following hack (no idea const FT two = FT(2);
// why original version doesn't work) const FT div = -det();
typename DA::Point p;
FT two = FT(2); return PT((two*s()*u() - t()*v()) / div,
FT div = -det();
dao.set( p, (two*s()*u() - t()*v()) / div,
(two*r()*v() - t()*u()) / div); (two*r()*v() - t()*u()) / div);
return p;
} }
Conic_type conic_type () const Conic_type conic_type () const

View File

@ -276,15 +276,12 @@ line_get_pointC2(const FT &a, const FT &b, const FT &c, const FT &i,
{ {
if (CGAL_NTS is_zero(b)) if (CGAL_NTS is_zero(b))
{ {
// Laurent Rineau, 2018/12/07: I add this CGAL_assume to calm // Silence a warning for MSVC 2017
// down a warning from MSVC 2017:
// > include\cgal\constructions\kernel_ftc2.h(287) : // > include\cgal\constructions\kernel_ftc2.h(287) :
// > warning C4723: potential divide by 0 // > warning C4723: potential divide by 0
// The test `!boost::is_integral<FT>::value` is there to avoid #if defined(BOOST_MSVC)
// that `a != 0` is tested on anything but integral types, for #pragma warning(suppress:4723)
// performance reasons. #endif
CGAL_assume(!boost::is_integral<FT>::value || a != FT(0));
x = -c/a; x = -c/a;
y = 1 - i * a; y = 1 - i * a;
} }

View File

@ -79,9 +79,15 @@ int main()
Convex_hull_d::Point_const_iterator pit; Convex_hull_d::Point_const_iterator pit;
Convex_hull_d::Vertex_iterator vit; Convex_hull_d::Vertex_iterator vit;
Convex_hull_d::Simplex_iterator sit; Convex_hull_d::Simplex_iterator sit;
for (pit = T1.points_begin(); pit != T1.points_end(); pit++) *pit; for (pit = T1.points_begin(); pit != T1.points_end(); pit++) {
for (vit = T1.vertices_begin(); vit != T1.vertices_end(); vit++) *vit; const Point& p = *pit;
for (sit = T1.simplices_begin(); sit != T1.simplices_end(); sit++) *sit; CGAL_USE(p);
}
for (vit = T1.vertices_begin(); vit != T1.vertices_end(); vit++)
*vit;
for (sit = T1.simplices_begin(); sit != T1.simplices_end(); sit++)
*sit;
T1.is_valid(); T1.is_valid();
T1.clear(2); T1.clear(2);
CGAL_TEST(T1.number_of_vertices()==0); CGAL_TEST(T1.number_of_vertices()==0);

View File

@ -41,7 +41,8 @@ fct(const P& )
{ {
std::map<Descriptor,int> M; std::map<Descriptor,int> M;
Descriptor d; Descriptor d;
M.find(d); typename std::map<Descriptor,int>::const_iterator it = M.find(d);
CGAL_USE(it);
boost::unordered_map<Descriptor, int> U; boost::unordered_map<Descriptor, int> U;
U[d] = 12; U[d] = 12;
@ -56,7 +57,9 @@ void fct2()
{ // For dart handle { // For dart handle
std::map<dh, int> M; std::map<dh, int> M;
dh e; dh e;
M.find(e); typename std::map<dh, int>::const_iterator it = M.find(e);
CGAL_USE(it);
boost::unordered_map<dh, int> U; boost::unordered_map<dh, int> U;
U[e] = 12; U[e] = 12;
} }
@ -64,7 +67,9 @@ void fct2()
{ // For vertex attribute handle { // For vertex attribute handle
std::map<vh, int> M; std::map<vh, int> M;
vh e; vh e;
M.find(e); typename std::map<vh, int>::const_iterator it = M.find(e);
CGAL_USE(it);
boost::unordered_map<vh, int> U; boost::unordered_map<vh, int> U;
U[e] = 12; U[e] = 12;
} }

View File

@ -1373,7 +1373,6 @@ private:
std::size_t vertex_id(const std::size_t& i) const std::size_t vertex_id(const std::size_t& i) const
{ {
CGAL_precondition(i >= 0);
CGAL_precondition((infinite_ && i < 3) || i < 4); CGAL_precondition((infinite_ && i < 3) || i < 4);
return vertices_[i]; return vertices_[i];
} }

View File

@ -540,8 +540,13 @@ public:
Mark m[2]; Mark m[2];
Object_handle o_supp[2]; Object_handle o_supp[2];
SHalfedge_handle e_below; SHalfedge_handle e_below;
vertex_info() vertex_info()
{ o_supp[0]=o_supp[1]=Object_handle(); } {
m[0]=m[1]=Mark();
o_supp[0]=o_supp[1]=Object_handle();
}
LEDA_MEMORY(vertex_info) LEDA_MEMORY(vertex_info)
}; // vertex_info }; // vertex_info

View File

@ -91,12 +91,14 @@ void test_lazy_exact_nt() {
assert( cast ( (i*i+i) / i-i ) == LR(1)); assert( cast ( (i*i+i) / i-i ) == LR(1));
assert( cast ( (i*i+r) / i-i ) == LR(1)); assert( cast ( (i*i+r) / i-i ) == LR(1));
assert( cast ( (i*r+r) / i-i ) == LI(1)); assert( cast ( (i*r+r) / i-i ) == LI(1));
}{ // see also Coercion_traits_test.C }
{ // see also Coercion_traits_test.C
#ifdef CGAL_USE_LEDA #ifdef CGAL_USE_LEDA
#ifdef CGAL_USE_CORE #ifdef CGAL_USE_CORE
typedef CGAL::Lazy_exact_nt<leda_integer > T1; CGAL_assertion_code(typedef CGAL::Lazy_exact_nt<leda_integer> T1;)
typedef CGAL::Lazy_exact_nt<CORE::Expr > T2; CGAL_assertion_code(typedef CGAL::Lazy_exact_nt<CORE::Expr> T2;)
typedef CGAL::Coercion_traits<T1,T2> CT; CGAL_assertion_code(typedef CGAL::Coercion_traits<T1, T2> CT;)
CGAL_static_assertion((boost::is_same< typename CT::Are_implicit_interoperable,CGAL::Tag_false>::value)); CGAL_static_assertion((boost::is_same< typename CT::Are_implicit_interoperable,CGAL::Tag_false>::value));
CGAL_static_assertion((boost::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_false>::value)); CGAL_static_assertion((boost::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_false>::value));
#endif #endif

View File

@ -147,10 +147,8 @@ update_new_point(
typedef typename rich_grid_internal::Rich_point<Kernel> Rich_point; typedef typename rich_grid_internal::Rich_point<Kernel> Rich_point;
CGAL_assertion_code( unsigned int size = static_cast<unsigned int>(rich_point_set.size()) ); CGAL_assertion_code( unsigned int size = static_cast<unsigned int>(rich_point_set.size()) );
CGAL_point_set_processing_precondition(father_index >= 0 && CGAL_point_set_processing_precondition(father_index < size);
father_index < size); CGAL_point_set_processing_precondition(mother_index < size);
CGAL_point_set_processing_precondition(mother_index >= 0 &&
mother_index < size);
// 1, get neighbor information from the two "parent points" // 1, get neighbor information from the two "parent points"
Rich_point& new_v = rich_point_set[new_point_index]; Rich_point& new_v = rich_point_set[new_point_index];

View File

@ -207,9 +207,6 @@ MainWindow::MainWindow()
this->addRecentFiles(this->menuFile, this->actionQuit); this->addRecentFiles(this->menuFile, this->actionQuit);
connect(this, SIGNAL(openRecentFile(QString)), this, SLOT(open(QString))); connect(this, SIGNAL(openRecentFile(QString)), this, SLOT(open(QString)));
// QObject::connect(thresholdSlider, SIGNAL(valueChanged(int)), this, SLOT(set_Threshold(int)));
} }

View File

@ -279,14 +279,6 @@
<include location="../icons/Triangulation_2.qrc" /> <include location="../icons/Triangulation_2.qrc" />
<include location="../icons/Input.qrc" /> <include location="../icons/Input.qrc" />
</resources> </resources>
<connections>
<connection>
<sender>thresholdSlider</sender>
<signal>valueChanged(int)</signal>
<receiver>MainWindow</receiver>
<slot>setThreshold(int)</slot>
</connection>
</connections>
<slots> <slots>
<slot>setThreshold(int)</slot> <slot>setThreshold(int)</slot>
</slots> </slots>

View File

@ -109,7 +109,7 @@ Polynomial<NT> modular_gcd_utcf_algorithm_M(
MScalar mg_; MScalar mg_;
MPoly mF1,mF2,mG_; MPoly mF1,mF2,mG_;
typename CRT::Scalar_type p,q,pq,s,t; typename CRT::Scalar_type p(0),q(0),pq,s,t;
Poly Gs,H1s,H2s, Gs_old; // s =^ star Poly Gs,H1s,H2s, Gs_old; // s =^ star
#ifdef CGAL_MODULAR_GCD_TIMER #ifdef CGAL_MODULAR_GCD_TIMER
timer_init.stop(); timer_init.stop();

View File

@ -204,7 +204,7 @@ namespace CGAL {
FT get_z(const Point_3& p){ return m_traits.compute_z_3_object()(p); } FT get_z(const Point_3& p){ return m_traits.compute_z_3_object()(p); }
FT get_coord(const Point_3& p, unsigned int d) FT get_coord(const Point_3& p, unsigned int d)
{ {
CGAL_assertion(d >= 0 && d < 3); CGAL_assertion(d < 3);
switch (d) switch (d)
{ {
case 0: return get_x(p); case 0: return get_x(p);

View File

@ -14,6 +14,20 @@
namespace CGAL { namespace CGAL {
namespace Total { namespace Total {
namespace internal {
//To avoid "fopen may be unsafe" on Visual.
bool open_file(FILE **fin, const char* filename)
{
#if defined(BOOST_MSVC)
return (fopen_s(fin, filename, "rw") == 0);
#else
*fin = fopen(filename, "rw");
return (fin != NULL);
#endif
}
} // namespace internal
void permuteLong(char *a) void permuteLong(char *a)
{ {
@ -99,7 +113,7 @@ int lire_longueur_trace(const char * nomfich, long * long_trace)
FILE *fin; FILE *fin;
int flag=0; int flag=0;
if ( (fin=fopen(nomfich,"rw"))!=NULL ) if ( internal::open_file(&fin, nomfich) )
{ {
fseek(fin,4,0); fseek(fin,4,0);
if (fread(long_trace,4,1,fin) != 1) { if (fread(long_trace,4,1,fin) != 1) {
@ -118,7 +132,7 @@ int lire_nb_trace(const char * nomfich, long * nb_trace)
FILE *fin; FILE *fin;
int flag=0; int flag=0;
if ( (fin=fopen(nomfich,"rw"))!=NULL ) if ( internal::open_file(&fin, nomfich) )
{ {
fseek(fin,8,0); fseek(fin,8,0);
if (fread(nb_trace,4,1,fin) != 1) { if (fread(nb_trace,4,1,fin) != 1) {
@ -137,7 +151,7 @@ int lire_nb_plan(const char * nomfich, long * nb_plan)
FILE *fin; FILE *fin;
int flag=0; int flag=0;
if ( (fin=fopen(nomfich,"rw"))!=NULL ) if ( internal::open_file(&fin, nomfich) )
{ {
fseek(fin,12,0); fseek(fin,12,0);
if (fread(nb_plan,4,1,fin) != 1) { if (fread(nb_plan,4,1,fin) != 1) {
@ -157,7 +171,7 @@ int lire_nb_octet(const char * nomfich, long * nb_octet)
FILE *fin; FILE *fin;
int flag=0; int flag=0;
if ( (fin=fopen(nomfich,"rw"))!=NULL ) if ( internal::open_file(&fin, nomfich) )
{ {
fseek(fin,36,0); fseek(fin,36,0);
if (fread(nb_octet,4,1,fin) != 1) { if (fread(nb_octet,4,1,fin) != 1) {
@ -177,7 +191,7 @@ int lire_longueur_entete(const char * nomfich, long * long_entete)
FILE *fin; FILE *fin;
int flag=0; int flag=0;
if ( (fin=fopen(nomfich,"rw"))!=NULL ) if ( internal::open_file(&fin, nomfich) )
{ {
fseek(fin,72,0); fseek(fin,72,0);
if (fread(long_entete,4,1,fin) != 1) { if (fread(long_entete,4,1,fin) != 1) {