From b185997a71c2a94e20ac87ab954fd3702fc0b49c Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Wed, 22 Aug 2012 14:31:11 +0000 Subject: [PATCH] Kill warning, convert Flat_orientation (may need something nicer later), test in_flat_orientation. --- .../include/CGAL/Kernel_d/KernelD_converter.h | 1 + NewKernel_d/include/CGAL/typeset.h | 12 ++++++++---- NewKernel_d/test/NewKernel_d/test.cpp | 7 ++++++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/NewKernel_d/include/CGAL/Kernel_d/KernelD_converter.h b/NewKernel_d/include/CGAL/Kernel_d/KernelD_converter.h index 1e8d3f3fc2a..fd87fac62f2 100644 --- a/NewKernel_d/include/CGAL/Kernel_d/KernelD_converter.h +++ b/NewKernel_d/include/CGAL/Kernel_d/KernelD_converter.h @@ -138,6 +138,7 @@ typename typeset_intersection::Type const&x)const{return cr(x);} + typename K2::Flat_orientation const& operator()(typename K1::Flat_orientation const&o)const{return o;} // Both kernels should have the same, returning a reference should warn if not. template transforming_iterator,It>::type> diff --git a/NewKernel_d/include/CGAL/typeset.h b/NewKernel_d/include/CGAL/typeset.h index d9bad3c39a7..422a768a18d 100644 --- a/NewKernel_d/include/CGAL/typeset.h +++ b/NewKernel_d/include/CGAL/typeset.h @@ -45,17 +45,21 @@ namespace CGAL { template struct contains : boost::mpl::if_,boost::true_type,typename tail::template contains >::type {}; - template struct add : + template struct add; //boost::mpl::if_,typeset,typeset >::type - typeset::type> - {}; - template struct add : typeset {}; }; template<> struct typeset<> { typedef typeset type; template struct contains : boost::false_type {}; template struct add : typeset {}; }; + + template + template + struct typeset::add : typeset::type> {}; + template + template + struct typeset::add : typeset {}; #endif template struct typeset_union_ : diff --git a/NewKernel_d/test/NewKernel_d/test.cpp b/NewKernel_d/test/NewKernel_d/test.cpp index 30588375636..ff5e1007860 100644 --- a/NewKernel_d/test/NewKernel_d/test.cpp +++ b/NewKernel_d/test/NewKernel_d/test.cpp @@ -183,10 +183,15 @@ void test3(){ P x[]={cp(2,2,3),cp(2,2,0),cp(1,2,1)}; FO fo2=cfo(&x[0],x+3); std::cout << fo2; - P y[]={cp(0,2,4),cp(3,1,2),cp(3,3,6)}; + P y[]={cp(0,2,4),cp(3,1,2),cp(3,3,6),cp(0,4,8)}; FO fo3=cfo(&y[0],y+3); assert(fo3.rest.size()==1 && fo3.rest[0]!=3); std::cout << fo3; + CGAL::Orientation base=ifo(fo3,&y[0],y+3); + assert(ifo(fo3,y+1,y+4)==base); + P yy[]={y[1],y[3],y[0],y[2]}; + assert(ifo(fo3,yy+0,yy+3)==base); + assert(ifo(fo3,yy+1,yy+4)==base); } int main(){