mirror of https://github.com/CGAL/cgal
libs compile without warning
This commit is contained in:
parent
e2f89318e5
commit
cbf3a16471
|
|
@ -36,6 +36,8 @@
|
|||
#ifndef _CORE_BIGFLOAT_H_
|
||||
#define _CORE_BIGFLOAT_H_
|
||||
|
||||
#include <CGAL/disable_warnings.h>
|
||||
|
||||
#include <CGAL/CORE/BigFloatRep.h>
|
||||
#include <CGAL/assertions.h>
|
||||
|
||||
|
|
@ -633,4 +635,6 @@ inline BigRat::BigRat(const BigFloat& f) : RCBigRat(new BigRatRep()){
|
|||
#include <CGAL/CORE/CoreIO_impl.h>
|
||||
#endif // CGAL_HEADER_ONLY
|
||||
|
||||
#include <CGAL/enable_warnings.h>
|
||||
|
||||
#endif // _CORE_BIGFLOAT_H_
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
#endif
|
||||
|
||||
#include <CGAL/CORE/CoreAux.h>
|
||||
#include <gmp.h>
|
||||
#include <CGAL/gmp.h>
|
||||
|
||||
namespace CORE {
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
#ifdef _MSC_VER
|
||||
// Suppress deprecated warning for fileno and strdup
|
||||
# pragma warning(disable:4996)
|
||||
# pragma warning(disable: 4127 4706 4996)
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,8 @@
|
|||
|
||||
#ifndef CGAL_HEADER_ONLY
|
||||
|
||||
#include <CGAL/disable_warnings.h>
|
||||
#include <CGAL/Qt/DemosMainWindow.h>
|
||||
#include <CGAL/Qt/DemosMainWindow_impl.h>
|
||||
|
||||
#include <CGAL/enable_warnings.h>
|
||||
#endif // CGAL_HEADER_ONLY
|
||||
|
|
|
|||
|
|
@ -22,7 +22,9 @@
|
|||
|
||||
#ifndef CGAL_HEADER_ONLY
|
||||
|
||||
#include <CGAL/disable_warnings.h>
|
||||
#include <CGAL/Qt/GraphicsViewNavigation.h>
|
||||
#include <CGAL/Qt/GraphicsViewNavigation_impl.h>
|
||||
#include <CGAL/enable_warnings.h>
|
||||
|
||||
#endif // CGAL_HEADER_ONLY
|
||||
|
|
|
|||
|
|
@ -22,7 +22,9 @@
|
|||
|
||||
#ifndef CGAL_HEADER_ONLY
|
||||
|
||||
#include <CGAL/disable_warnings.h>
|
||||
#include <CGAL/Qt/GraphicsViewPolylineInput.h>
|
||||
#include <CGAL/Qt/GraphicsViewPolylineInput_impl.h>
|
||||
#include <CGAL/enable_warnings.h>
|
||||
|
||||
#endif // CGAL_HEADER_ONLY
|
||||
|
|
|
|||
|
|
@ -21,7 +21,9 @@
|
|||
|
||||
#ifndef CGAL_HEADER_ONLY
|
||||
|
||||
#include <CGAL/disable_warnings.h>
|
||||
#include <CGAL/Qt/resources.h>
|
||||
#include <CGAL/Qt/resources_impl.h>
|
||||
#include <CGAL/enable_warnings.h>
|
||||
|
||||
#endif // CGAL_HEADER_ONLY
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
// Copyright (c) 2018 GeometryFactory (France). All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; either version 3 of the License,
|
||||
// or (at your option) any later version.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
//
|
||||
// Author: Andreas Fabri
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if defined(BOOST_MSVC)
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4512) // assignment operator could not be generated
|
||||
# pragma warning(disable: 4127) // conditional expression is constant
|
||||
#endif
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
// Copyright (c) 2018 GeometryFactory (France). All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; either version 3 of the License,
|
||||
// or (at your option) any later version.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
//
|
||||
// Author: Andreas Fabri
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if defined(BOOST_MSVC)
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
|
@ -108,6 +108,7 @@ inline void compute_linear_roots_t(const NT *begin, const NT *,
|
|||
NT lb, NT ub,
|
||||
std::vector<NT> &roots)
|
||||
{
|
||||
CGAL_USE(lb);
|
||||
if (CLEAN && begin[1]>0 ) return;
|
||||
//NT max_error=0;
|
||||
//if (CLEAN) max_error=max_error_value;
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@
|
|||
// Author(s) : Daniel Russel <drussel@alumni.princeton.edu>
|
||||
|
||||
#ifndef CGAL_HEADER_ONLY
|
||||
|
||||
#include <CGAL/disable_warnings.h>
|
||||
#include <CGAL/Polynomial/internal/numeric_solvers.h>
|
||||
#include <CGAL/Polynomial/internal/JAMA_numeric_solvers_impl.h>
|
||||
|
||||
#include <CGAL/enable_warnings.h>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@
|
|||
// Author(s) : Daniel Russel <drussel@alumni.princeton.edu>
|
||||
|
||||
#ifndef CGAL_HEADER_ONLY
|
||||
|
||||
#include <CGAL/disable_warnings.h>
|
||||
#include <CGAL/Polynomial/internal/numeric_solvers.h>
|
||||
#include <CGAL/Polynomial/internal/Turkowski_numeric_solvers_impl.h>
|
||||
|
||||
#include <CGAL/enable_warnings.h>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@
|
|||
|
||||
|
||||
#ifndef CGAL_HEADER_ONLY
|
||||
|
||||
#include <CGAL/disable_warnings.h>
|
||||
#include <CGAL/Polynomial/internal/numeric_solvers_support.h>
|
||||
#include <CGAL/Polynomial/internal/numeric_solvers_support_impl.h>
|
||||
|
||||
#include <CGAL/enable_warnings.h>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -349,7 +349,10 @@ class Gmpfr:
|
|||
// only avoid the binary incompatibility of a CGAL program compiled
|
||||
// with MSVC with the libmpfr-1.dll compiled with mingw.
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4244)
|
||||
CGAL_GMPFR_CONSTRUCTOR_FROM_TYPE(long double,mpfr_set_d);
|
||||
# pragma warning(pop)
|
||||
#else
|
||||
CGAL_GMPFR_CONSTRUCTOR_FROM_TYPE(long double,mpfr_set_ld);
|
||||
#endif
|
||||
|
|
@ -1283,17 +1286,17 @@ bool operator==(const Gmpfr &a,double b){
|
|||
#ifdef _MSC_VER
|
||||
inline
|
||||
bool operator<(const Gmpfr &a,long double b){
|
||||
return(mpfr_cmp_d(a.fr(),b)<0);
|
||||
return(mpfr_cmp_d(a.fr(),static_cast<double>(b))<0);
|
||||
}
|
||||
|
||||
inline
|
||||
bool operator>(const Gmpfr &a,long double b){
|
||||
return(mpfr_cmp_d(a.fr(),b)>0);
|
||||
return(mpfr_cmp_d(a.fr(),static_cast<double>(b))>0);
|
||||
}
|
||||
|
||||
inline
|
||||
bool operator==(const Gmpfr &a,long double b){
|
||||
return !mpfr_cmp_d(a.fr(),b);
|
||||
return !mpfr_cmp_d(a.fr(),static_cast<double>(b));
|
||||
}
|
||||
#else
|
||||
inline
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@
|
|||
#ifndef CGAL_GMPQ_TYPE_H
|
||||
#define CGAL_GMPQ_TYPE_H
|
||||
|
||||
#include <CGAL/disable_warnings.h>
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/IO/io.h>
|
||||
|
||||
|
|
@ -513,4 +515,6 @@ inline Gmpq max BOOST_PREVENT_MACRO_SUBSTITUTION(const Gmpq& x,const Gmpq& y){
|
|||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#include <CGAL/enable_warnings.h>
|
||||
|
||||
#endif // CGAL_GMPQ_TYPE_H
|
||||
|
|
|
|||
|
|
@ -464,7 +464,7 @@ std::ostream & operator<< (std::ostream &os, const Interval_nt<Protected> & I )
|
|||
#define CGAL_SWALLOW(IS,CHAR) \
|
||||
{ \
|
||||
char c; \
|
||||
do c = is.get(); while (isspace(c)); \
|
||||
do is.get(c); while (isspace(c)); \
|
||||
if (c != CHAR) { \
|
||||
is.setstate(std::ios_base::failbit); \
|
||||
} \
|
||||
|
|
@ -474,7 +474,7 @@ template <bool Protected>
|
|||
std::istream & operator>> (std::istream &is, Interval_nt<Protected> & I)
|
||||
{
|
||||
char c;
|
||||
do c = is.get(); while (isspace(c));
|
||||
do is.get(c); while (isspace(c));
|
||||
is.putback(c);
|
||||
if(c == '['){ // read original output from operator <<
|
||||
double inf,sup;
|
||||
|
|
@ -931,23 +931,6 @@ namespace INTERN_INTERVAL_NT {
|
|||
return Uncertain<bool>::indeterminate();
|
||||
}
|
||||
|
||||
// TODO: Whats this for? Why is this in this file??
|
||||
inline
|
||||
std::pair<double, double>
|
||||
to_interval (const long & l)
|
||||
{
|
||||
if (sizeof(double) > sizeof(long)) {
|
||||
// On 64bit platforms, a long doesn't fit exactly in a double.
|
||||
// Well, a perfect fix would be to use std::numeric_limits<>, but...
|
||||
Protect_FPU_rounding<true> P(CGAL_FE_TONEAREST);
|
||||
Interval_nt<false> approx (static_cast<double>(l));
|
||||
FPU_set_cw(CGAL_FE_UPWARD);
|
||||
approx += Interval_nt<false>::smallest();
|
||||
return approx.pair();
|
||||
}
|
||||
else
|
||||
return std::pair<double,double>(static_cast<double>(l),static_cast<double>(l));
|
||||
}
|
||||
} // namespace INTERN_INTERVAL_NT
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -21,10 +21,10 @@
|
|||
#define CGAL_GMP_H 1
|
||||
|
||||
#include <CGAL/config.h>
|
||||
|
||||
#include <CGAL/disable_warnings.h>
|
||||
#if defined(BOOST_MSVC)
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable:4244 4146) // conversion with loss of data
|
||||
# pragma warning(disable: 4127 4244 4146) // conversion with loss of data
|
||||
// warning on - applied on unsigned number
|
||||
#endif
|
||||
|
||||
|
|
@ -34,5 +34,5 @@
|
|||
#if defined(BOOST_MSVC)
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#include <CGAL/enable_warnings.h>
|
||||
#endif // CGAL_GMP_H
|
||||
|
|
|
|||
|
|
@ -58,6 +58,8 @@
|
|||
#include <string>
|
||||
#include <map>
|
||||
|
||||
#include <CGAL/disable_warnings.h>
|
||||
|
||||
// Automatically define CGAL_CONCURRENT_PROFILE if we're linked with TBB
|
||||
#ifdef CGAL_LINKED_WITH_TBB
|
||||
# ifndef CGAL_CONCURRENT_PROFILE
|
||||
|
|
@ -256,4 +258,6 @@ private:
|
|||
|
||||
} //namespace CGAL
|
||||
|
||||
#include <CGAL/enable_warnings.h>
|
||||
|
||||
#endif // CGAL_PROFILE_COUNTER_H
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@
|
|||
#ifndef CGAL_IO_FILE_SCANNER_OFF_H
|
||||
#define CGAL_IO_FILE_SCANNER_OFF_H 1
|
||||
|
||||
#include <CGAL/disable_warnings.h>
|
||||
|
||||
#include <CGAL/config.h>
|
||||
#include <cstddef>
|
||||
#include <CGAL/IO/binary_file_io.h>
|
||||
|
|
@ -699,5 +701,7 @@ file_scan_normal( File_scanner_OFF& scanner, Vector& v) {
|
|||
#include <CGAL/IO/File_scanner_OFF_impl.h>
|
||||
#endif // CGAL_HEADER_ONLY
|
||||
|
||||
#include <CGAL/enable_warnings.h>
|
||||
|
||||
#endif // CGAL_IO_FILE_SCANNER_OFF_H //
|
||||
// EOF //
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
#ifndef CGAL_IO_H
|
||||
#define CGAL_IO_H
|
||||
|
||||
#include <CGAL/disable_warnings.h>
|
||||
|
||||
#include <cstdio>
|
||||
#include <cctype>
|
||||
|
|
@ -616,4 +617,6 @@ inline void read_float_or_quotient(std::istream& is, Rat &z)
|
|||
#include <CGAL/IO/io_impl.h>
|
||||
#endif // CGAL_HEADER_ONLY
|
||||
|
||||
#include <CGAL/enable_warnings.h>
|
||||
|
||||
#endif // CGAL_IO_H
|
||||
|
|
|
|||
Loading…
Reference in New Issue