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;
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,
Algebraic_real_1 alpha)

View File

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

View File

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

View File

@ -312,15 +312,12 @@ class ConicCPA2
PT center () const
{
CGAL_kernel_precondition (type != PARABOLA);
// PT p;
// replaced previous line by following hack (no idea
// why original version doesn't work)
typename DA::Point p;
FT two = FT(2);
FT div = -det();
dao.set( p, (two*s()*u() - t()*v()) / div,
const FT two = FT(2);
const FT div = -det();
return PT((two*s()*u() - t()*v()) / div,
(two*r()*v() - t()*u()) / div);
return p;
}
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))
{
// Laurent Rineau, 2018/12/07: I add this CGAL_assume to calm
// down a warning from MSVC 2017:
// Silence a warning for MSVC 2017
// > include\cgal\constructions\kernel_ftc2.h(287) :
// > warning C4723: potential divide by 0
// The test `!boost::is_integral<FT>::value` is there to avoid
// that `a != 0` is tested on anything but integral types, for
// performance reasons.
CGAL_assume(!boost::is_integral<FT>::value || a != FT(0));
#if defined(BOOST_MSVC)
#pragma warning(suppress:4723)
#endif
x = -c/a;
y = 1 - i * a;
}

View File

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

View File

@ -41,7 +41,8 @@ fct(const P& )
{
std::map<Descriptor,int> M;
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;
U[d] = 12;
@ -56,7 +57,9 @@ void fct2()
{ // For dart handle
std::map<dh, int> M;
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;
U[e] = 12;
}
@ -64,7 +67,9 @@ void fct2()
{ // For vertex attribute handle
std::map<vh, int> M;
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;
U[e] = 12;
}

View File

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

View File

@ -540,8 +540,13 @@ public:
Mark m[2];
Object_handle o_supp[2];
SHalfedge_handle e_below;
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)
}; // 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+r) / i-i ) == LR(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_CORE
typedef CGAL::Lazy_exact_nt<leda_integer > T1;
typedef CGAL::Lazy_exact_nt<CORE::Expr > T2;
typedef CGAL::Coercion_traits<T1,T2> CT;
CGAL_assertion_code(typedef CGAL::Lazy_exact_nt<leda_integer> T1;)
CGAL_assertion_code(typedef CGAL::Lazy_exact_nt<CORE::Expr> T2;)
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_explicit_interoperable,CGAL::Tag_false>::value));
#endif

View File

@ -147,10 +147,8 @@ update_new_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_point_set_processing_precondition(father_index >= 0 &&
father_index < size);
CGAL_point_set_processing_precondition(mother_index >= 0 &&
mother_index < size);
CGAL_point_set_processing_precondition(father_index < size);
CGAL_point_set_processing_precondition(mother_index < size);
// 1, get neighbor information from the two "parent points"
Rich_point& new_v = rich_point_set[new_point_index];

View File

@ -207,9 +207,6 @@ MainWindow::MainWindow()
this->addRecentFiles(this->menuFile, this->actionQuit);
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/Input.qrc" />
</resources>
<connections>
<connection>
<sender>thresholdSlider</sender>
<signal>valueChanged(int)</signal>
<receiver>MainWindow</receiver>
<slot>setThreshold(int)</slot>
</connection>
</connections>
<slots>
<slot>setThreshold(int)</slot>
</slots>

View File

@ -109,7 +109,7 @@ Polynomial<NT> modular_gcd_utcf_algorithm_M(
MScalar 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
#ifdef CGAL_MODULAR_GCD_TIMER
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_coord(const Point_3& p, unsigned int d)
{
CGAL_assertion(d >= 0 && d < 3);
CGAL_assertion(d < 3);
switch (d)
{
case 0: return get_x(p);

View File

@ -14,6 +14,20 @@
namespace CGAL {
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)
{
@ -99,7 +113,7 @@ int lire_longueur_trace(const char * nomfich, long * long_trace)
FILE *fin;
int flag=0;
if ( (fin=fopen(nomfich,"rw"))!=NULL )
if ( internal::open_file(&fin, nomfich) )
{
fseek(fin,4,0);
if (fread(long_trace,4,1,fin) != 1) {
@ -118,7 +132,7 @@ int lire_nb_trace(const char * nomfich, long * nb_trace)
FILE *fin;
int flag=0;
if ( (fin=fopen(nomfich,"rw"))!=NULL )
if ( internal::open_file(&fin, nomfich) )
{
fseek(fin,8,0);
if (fread(nb_trace,4,1,fin) != 1) {
@ -137,7 +151,7 @@ int lire_nb_plan(const char * nomfich, long * nb_plan)
FILE *fin;
int flag=0;
if ( (fin=fopen(nomfich,"rw"))!=NULL )
if ( internal::open_file(&fin, nomfich) )
{
fseek(fin,12,0);
if (fread(nb_plan,4,1,fin) != 1) {
@ -157,7 +171,7 @@ int lire_nb_octet(const char * nomfich, long * nb_octet)
FILE *fin;
int flag=0;
if ( (fin=fopen(nomfich,"rw"))!=NULL )
if ( internal::open_file(&fin, nomfich) )
{
fseek(fin,36,0);
if (fread(nb_octet,4,1,fin) != 1) {
@ -177,7 +191,7 @@ int lire_longueur_entete(const char * nomfich, long * long_entete)
FILE *fin;
int flag=0;
if ( (fin=fopen(nomfich,"rw"))!=NULL )
if ( internal::open_file(&fin, nomfich) )
{
fseek(fin,72,0);
if (fread(long_entete,4,1,fin) != 1) {