From: ageay Date: Thu, 13 Mar 2008 15:00:16 +0000 (+0000) Subject: Some modifs for compilation with Wall et pedantic options. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ad3b9990eed0bddd13cac0350761b9d7060d16cd;p=tools%2Fmedcoupling.git Some modifs for compilation with Wall et pedantic options. --- 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];