mirror of https://github.com/CGAL/cgal
use more types
This commit is contained in:
parent
61afcbbd9b
commit
c029f702a3
|
|
@ -35,6 +35,7 @@
|
|||
#include <CGAL/Residue.h>
|
||||
#include <CGAL/Sqrt_extension.h>
|
||||
#include <CGAL/primes.h>
|
||||
#include <CGAL/use.h>
|
||||
|
||||
#include <cassert>
|
||||
|
||||
|
|
@ -81,7 +82,7 @@ void test_CR_for(const NT& f){
|
|||
CGAL::Set_ieee_double_precision pfr;
|
||||
|
||||
typedef CGAL::Modular_traits<NT> MT;
|
||||
typedef typename CGAL::Modular_traits<NT>::Residue_type MNT;
|
||||
CGAL_USE_TYPE(typename CGAL::Modular_traits<NT>::Residue_type);
|
||||
typename MT::Modular_image modular_image;
|
||||
typename MT::Modular_image_representative modular_image_representative;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
#include <CGAL/basic.h>
|
||||
#include <cassert>
|
||||
#include <CGAL/enum.h>
|
||||
#include <CGAL/Testsuite/use.h>
|
||||
#include <CGAL/use.h>
|
||||
|
||||
#include <CGAL/Vector_2.h> // this is done in order to avoid error
|
||||
// when the Segment_2_Segment_2_intersection.h file is included from
|
||||
|
|
@ -129,6 +129,12 @@ bool test_traits_base(const Traits& = Traits())
|
|||
typedef typename Traits::Is_degenerate_edge_2
|
||||
Is_degenerate_edge_2;
|
||||
|
||||
CGAL_USE_TYPE(FT);
|
||||
CGAL_USE_TYPE(RT);
|
||||
CGAL_USE_TYPE(Object_2);
|
||||
CGAL_USE_TYPE(Line_2);
|
||||
CGAL_USE_TYPE(Ray_2);
|
||||
CGAL_USE_TYPE(Segment_2);
|
||||
|
||||
// testing constructors
|
||||
//--------------------------------------------------------------------
|
||||
|
|
@ -503,6 +509,9 @@ bool test_algo_generic(InputStream& is)
|
|||
|
||||
typedef typename Apollonius_graph::size_type size_type;
|
||||
|
||||
CGAL_USE_TYPE(Data_structure);
|
||||
CGAL_USE_TYPE(Point_2);
|
||||
CGAL_USE_TYPE(Edge);
|
||||
|
||||
Null_output_stream nos;
|
||||
|
||||
|
|
|
|||
|
|
@ -277,7 +277,6 @@ void EnvelopeCallback< Arr_, Traits >::
|
|||
updateEnvelope(bool lower,
|
||||
CGAL::Arr_circular_arc_traits_2< CircularKernel > /* traits */)
|
||||
{
|
||||
typedef Kernel_point_2 Non_arc_point_2;
|
||||
typedef typename Traits::Point_2 Arc_point_2;
|
||||
CGAL::Qt::CurveGraphicsItem< Traits >* envelopeToUpdate;
|
||||
if ( lower )
|
||||
|
|
|
|||
|
|
@ -231,8 +231,6 @@ bool is_closed_polygon(const typename Traits_2::Polygon_2& pgn, Traits_2 traits)
|
|||
template <typename Traits_2>
|
||||
bool is_simple_polygon(const typename Traits_2::Polygon_2& pgn, Traits_2 traits)
|
||||
{
|
||||
|
||||
typedef Gps_traits_adaptor<Traits_2> Traits_adapter_2;
|
||||
typedef typename Traits_2::Curve_const_iterator Curve_const_iterator;
|
||||
typedef std::pair<Curve_const_iterator,Curve_const_iterator> Cci_pair;
|
||||
|
||||
|
|
@ -342,8 +340,6 @@ bool
|
|||
is_crossover_outer_boundary(const typename Traits_2::Polygon_with_holes_2& pgn,
|
||||
Traits_2 traits, PointLocation& pl)
|
||||
{
|
||||
|
||||
typedef Gps_traits_adaptor<Traits_2> Traits_adapter_2;
|
||||
typedef typename Traits_2::Curve_const_iterator Curve_const_iterator;
|
||||
typedef std::pair<Curve_const_iterator,Curve_const_iterator> Cci_pair;
|
||||
|
||||
|
|
@ -489,8 +485,6 @@ template <typename Traits_2>
|
|||
bool is_relatively_simple_polygon_with_holes
|
||||
(const typename Traits_2::Polygon_with_holes_2& pgn, Traits_2 traits)
|
||||
{
|
||||
|
||||
typedef Gps_traits_adaptor<Traits_2> Traits_adapter_2;
|
||||
typedef typename Traits_2::Curve_const_iterator Curve_const_iterator;
|
||||
typedef std::pair<Curve_const_iterator,Curve_const_iterator> Cci_pair;
|
||||
typedef typename Traits_2::Construct_curves_2 Construct_curves_2;
|
||||
|
|
@ -554,7 +548,6 @@ bool has_valid_orientation_polygon_with_holes
|
|||
typedef std::pair<Curve_const_iterator,Curve_const_iterator> Cci_pair;
|
||||
typedef typename Traits_2::Construct_curves_2 Construct_curves_2;
|
||||
|
||||
typedef Gps_polygon_validation_visitor<Traits_2> Visitor;
|
||||
typedef typename Traits_adapter_2::Orientation_2 Check_orientation_2;
|
||||
typedef typename Traits_2::Polygon_with_holes_2 Polygon_with_holes_2;
|
||||
|
||||
|
|
@ -606,8 +599,6 @@ template <class Traits_2>
|
|||
bool are_holes_and_boundary_pairwise_disjoint
|
||||
(const typename Traits_2::Polygon_with_holes_2& pwh, Traits_2& traits)
|
||||
{
|
||||
|
||||
typedef Gps_traits_adaptor<Traits_2> Traits_adapter_2;
|
||||
typedef typename Traits_2::Curve_const_iterator Curve_const_iterator;
|
||||
typedef std::pair<Curve_const_iterator,Curve_const_iterator> Cci_pair;
|
||||
typedef typename Traits_2::Construct_curves_2 Construct_curves_2;
|
||||
|
|
@ -632,7 +623,7 @@ bool are_holes_and_boundary_pairwise_disjoint
|
|||
typedef typename Traits_2::Construct_curves_2 Construct_curves_2;
|
||||
typedef typename Traits_2::Construct_general_polygon_with_holes_2
|
||||
Construct_polygon_with_holes_2;
|
||||
typedef typename Traits_adapter_2::Construct_vertex_2 Construct_vertex_2;
|
||||
|
||||
typedef Gps_polygon_validation_visitor<Traits_2> Visitor;
|
||||
typedef Sweep_line_2<Traits_2, Visitor> Sweep_line ;
|
||||
typedef typename Polygon_set_2::Arrangement_on_surface_2 Arrangement_2;
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
#include <CGAL/Min_circle_2/Min_circle_2_adapterC2.h>
|
||||
#include <CGAL/Min_circle_2/Min_circle_2_adapterH2.h>
|
||||
#include <CGAL/IO/Verbose_ostream.h>
|
||||
#include <CGAL/use.h>
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
#include <fstream>
|
||||
|
|
@ -61,7 +62,7 @@ cover_Min_circle_2( bool verbose, const Traits&, const RT&)
|
|||
|
||||
typedef CGAL::Min_circle_2< Traits > Min_circle;
|
||||
typedef typename Min_circle::Point Point;
|
||||
typedef typename Min_circle::Circle Circle;
|
||||
CGAL_USE_TYPE(typename Min_circle::Circle);
|
||||
|
||||
CGAL::Verbose_ostream verr( verbose);
|
||||
|
||||
|
|
@ -441,7 +442,6 @@ main( int argc, char* argv[])
|
|||
|
||||
typedef CGAL::Min_circle_2< TraitsH > Min_circle;
|
||||
typedef Min_circle::Point Point;
|
||||
typedef Min_circle::Circle Circle;
|
||||
|
||||
CGAL::Verbose_ostream verr( verbose);
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
#include <CGAL/Min_ellipse_2/Min_ellipse_2_adapterC2.h>
|
||||
#include <CGAL/Min_ellipse_2/Min_ellipse_2_adapterH2.h>
|
||||
#include <CGAL/IO/Verbose_ostream.h>
|
||||
#include <CGAL/use.h>
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
#include <fstream>
|
||||
|
|
@ -90,7 +91,7 @@ core_test_Min_ellipse_2( bool verbose, const Traits&)
|
|||
|
||||
typedef CGAL::Min_ellipse_2< Traits > Min_ellipse;
|
||||
typedef typename Min_ellipse::Point Point;
|
||||
typedef typename Min_ellipse::Ellipse Ellipse;
|
||||
CGAL_USE_TYPE(typename Min_ellipse::Ellipse);
|
||||
|
||||
CGAL::Verbose_ostream verr( verbose);
|
||||
|
||||
|
|
@ -155,7 +156,6 @@ double_test_Min_ellipse_2( bool verbose, const Traits&, const Conic&)
|
|||
|
||||
typedef CGAL::Min_ellipse_2< Traits > Min_ellipse;
|
||||
typedef typename Min_ellipse::Point Point;
|
||||
typedef typename Min_ellipse::Ellipse Ellipse;
|
||||
|
||||
CGAL::Verbose_ostream verr( verbose);
|
||||
|
||||
|
|
@ -226,7 +226,6 @@ cover_Min_ellipse_2( bool verbose, const Traits&, const RT&)
|
|||
|
||||
typedef CGAL::Min_ellipse_2< Traits > Min_ellipse;
|
||||
typedef typename Min_ellipse::Point Point;
|
||||
typedef typename Min_ellipse::Ellipse Ellipse;
|
||||
|
||||
CGAL::Verbose_ostream verr( verbose);
|
||||
|
||||
|
|
@ -648,7 +647,6 @@ main( int argc, char* argv[])
|
|||
|
||||
typedef CGAL::Min_ellipse_2< TraitsH > Min_ellipse;
|
||||
typedef Min_ellipse::Point Point;
|
||||
typedef Min_ellipse::Ellipse Ellipse;
|
||||
|
||||
CGAL::Verbose_ostream verr( verbose);
|
||||
|
||||
|
|
|
|||
|
|
@ -554,12 +554,10 @@ namespace CircularFunctors {
|
|||
const typename CK::Circular_arc_2 &c,
|
||||
OutputIterator res )
|
||||
{
|
||||
typedef typename CK::Circular_arc_2 Circular_arc_2;
|
||||
typedef typename CK::Circular_arc_point_2 Circular_arc_point_2;
|
||||
typedef typename CK::Line_arc_2 Line_arc_2;
|
||||
typedef std::vector<CGAL::Object > solutions_container;
|
||||
|
||||
#ifdef CGAL_CK_EXPLOIT_IDENTITY
|
||||
typedef typename CK::Circular_arc_point_2 Circular_arc_point_2;
|
||||
bool ls_cs = l.source().equal_ref(c.source());
|
||||
bool ls_ct = l.source().equal_ref(c.target());
|
||||
bool lt_cs = l.target().equal_ref(c.source());
|
||||
|
|
@ -659,6 +657,7 @@ namespace CircularFunctors {
|
|||
solutions_container solutions;
|
||||
|
||||
#ifdef CGAL_INTERSECTION_MAP_FOR_SUPPORTING_CIRCLES
|
||||
typedef typename CK::Line_arc_2 Line_arc_2;
|
||||
if(!Line_arc_2::template
|
||||
find_intersection_circle_line< solutions_container >
|
||||
(c,l,solutions)) {
|
||||
|
|
@ -752,9 +751,7 @@ namespace CircularFunctors {
|
|||
OutputIterator res )
|
||||
{
|
||||
typedef typename CK::Circular_arc_point_2 Circular_arc_point_2;
|
||||
typedef typename CK::Line_arc_2 Line_arc_2;
|
||||
typedef typename CK::Point_2 Point_2;
|
||||
typedef typename CK::Line_2 Line_2;
|
||||
|
||||
if(LinearFunctors::non_oriented_equal<CK>(l, la.supporting_line())) {
|
||||
*res++ = make_object(la);
|
||||
|
|
@ -778,7 +775,6 @@ namespace CircularFunctors {
|
|||
const typename CK::Circular_arc_2 &c,
|
||||
OutputIterator res )
|
||||
{
|
||||
typedef typename CK::Circular_arc_2 Circular_arc_2;
|
||||
typedef typename CK::Circular_arc_point_2 Circular_arc_point_2;
|
||||
typedef std::vector<CGAL::Object > solutions_container;
|
||||
|
||||
|
|
@ -790,9 +786,9 @@ namespace CircularFunctors {
|
|||
|
||||
for (typename solutions_container::iterator it = solutions.begin();
|
||||
it != solutions.end(); ++it) {
|
||||
const std::pair<typename CK::Circular_arc_point_2, unsigned>
|
||||
const std::pair<Circular_arc_point_2, unsigned>
|
||||
*result = CGAL::object_cast
|
||||
<std::pair<typename CK::Circular_arc_point_2, unsigned> > (&(*it));
|
||||
<std::pair<Circular_arc_point_2, unsigned> > (&(*it));
|
||||
if (has_on<CK>(c,result->first,true)) {
|
||||
*res++ = *it;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
#include <cassert>
|
||||
#include <CGAL/tags.h>
|
||||
#include <CGAL/use.h>
|
||||
|
||||
#include <CGAL/Bigfloat_interval_traits.h>
|
||||
|
||||
|
|
@ -42,7 +43,7 @@ void test_bigfloat_interval_traits() {
|
|||
|
||||
typedef typename CGAL::Bigfloat_interval_traits<Bigfloat_interval_>::Self BFIT;
|
||||
typedef typename BFIT::Type BFI;
|
||||
typedef typename BFIT::Bound BF;
|
||||
CGAL_USE_TYPE(typename BFIT::Bound);
|
||||
|
||||
typedef typename BFIT::Is_bigfloat_interval Is_bigfloat_interval;
|
||||
// using CGAL::Tag_true;
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
#define CGAL_TEST_UTILITIES_H
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/use.h>
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
|
@ -30,10 +31,6 @@
|
|||
|
||||
namespace CGAL {
|
||||
|
||||
// Used to shut down some warnings about unused variables.
|
||||
template < class T >
|
||||
void use(const T&) {}
|
||||
|
||||
template < class NT, class Sqrt>
|
||||
bool
|
||||
test_sqrt(const NT&, Sqrt)
|
||||
|
|
@ -123,7 +120,7 @@ test_basic_operators(const NT&)
|
|||
d = a==b;
|
||||
d = a!=b;
|
||||
|
||||
use(a); use(b); use(d);
|
||||
CGAL_USE(a); CGAL_USE(b); CGAL_USE(d);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,7 +70,6 @@ void Scene::load_points(const QString& fileName) {
|
|||
std::back_inserter(points));
|
||||
std::random_shuffle(points.begin(), points.end());
|
||||
p3dt.insert(points.begin(), points.end());
|
||||
Vertex_iterator vit = p3dt.vertices_begin();
|
||||
|
||||
make_draw_list();
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
#include <cassert>
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/use.h>
|
||||
#include <CGAL/Arithmetic_kernel.h>
|
||||
#include <CGAL/Sqrt_extension.h>
|
||||
#include <CGAL/ipower.h>
|
||||
|
|
@ -47,7 +48,10 @@ static CGAL::Random my_rnd(346); // some seed
|
|||
typedef typename PT::Innermost_coefficient_type ICoeff; \
|
||||
typedef CGAL::Polynomial_traits_d<Coeff> PTC; \
|
||||
typedef CGAL::Exponent_vector Exponent_vector; \
|
||||
typedef std::pair< CGAL::Exponent_vector , ICoeff > Monom;
|
||||
typedef std::pair< CGAL::Exponent_vector , ICoeff > Monom;\
|
||||
CGAL_USE_TYPE(PTC);\
|
||||
CGAL_USE_TYPE(Exponent_vector);\
|
||||
CGAL_USE_TYPE(Monom)
|
||||
|
||||
|
||||
#define ASSERT_IS_NULL_FUNCTOR(T) \
|
||||
|
|
@ -102,7 +106,15 @@ generate_sparse_random_polynomial(int max_degree = 10){
|
|||
}
|
||||
|
||||
template <class Polynomial_traits_d> class Construct_test_polynomial {
|
||||
CGAL_SNAP_CGALi_TRAITS_D(Polynomial_traits_d)
|
||||
|
||||
typedef Polynomial_traits_d PT;
|
||||
typedef typename PT::Polynomial_d Polynomial_d;
|
||||
typedef typename PT::Coefficient_type Coeff;
|
||||
typedef typename PT::Innermost_coefficient_type ICoeff;
|
||||
typedef CGAL::Polynomial_traits_d<Coeff> PTC;
|
||||
typedef CGAL::Exponent_vector Exponent_vector;
|
||||
typedef std::pair< CGAL::Exponent_vector , ICoeff > Monom;
|
||||
|
||||
typedef typename PT::Construct_polynomial Constructor;
|
||||
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ _test_cls_triangulation_simplex_3(const Triangulation &)
|
|||
typedef typename Cls::Finite_facets_iterator Finite_facets_iterator;
|
||||
typedef typename Cls::Finite_cells_iterator Finite_cells_iterator;
|
||||
|
||||
CGAL_USE_TYPE(Vertex);
|
||||
CGAL_USE_TYPE(Cell);
|
||||
CGAL_USE_TYPE(size_type);
|
||||
CGAL_USE_TYPE(difference_type);
|
||||
|
|
|
|||
Loading…
Reference in New Issue