From ad3b9990eed0bddd13cac0350761b9d7060d16cd Mon Sep 17 00:00:00 2001 From: ageay Date: Thu, 13 Mar 2008 15:00:16 +0000 Subject: [PATCH] Some modifs for compilation with Wall et pedantic options. --- src/INTERP_KERNEL/InterpolationUtils.hxx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/INTERP_KERNEL/InterpolationUtils.hxx b/src/INTERP_KERNEL/InterpolationUtils.hxx index 52d3e0615..366c101c6 100644 --- a/src/INTERP_KERNEL/InterpolationUtils.hxx +++ b/src/INTERP_KERNEL/InterpolationUtils.hxx @@ -331,9 +331,9 @@ namespace INTERP_KERNEL {return V;} else { - double COS[taille/2]; - double SIN[taille/2]; - double angle[taille/2]; + double *COS=new double[taille/2]; + double *SIN=new double[taille/2]; + double *angle=new double[taille/2]; std::vector Bary=bary_poly(V); COS[0]=1.0; SIN[0]=0.0; @@ -362,6 +362,9 @@ namespace INTERP_KERNEL Pt_ordonne.push_back(V[2*j]); Pt_ordonne.push_back(V[2*j+1]); } + delete [] COS; + delete [] SIN; + delete [] angle; return Pt_ordonne; } } @@ -542,10 +545,10 @@ namespace INTERP_KERNEL } /*_ _ _ _ _ _ _ _ _ - /*_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ */ - /* fonctions qui calcule l'aire d'un polygone en dimension 2 ou 3 */ - /*_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ */ - template inline double polygon_area(std::vector& inter) + *_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + * fonctions qui calcule l'aire d'un polygone en dimension 2 ou 3 + *_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ */ + template inline double polygon_area(std::vector& inter) { double result=0.; double area[DIM]; -- 2.39.2