From c77538b5b233037da72564ec88e32cbde8fc260b Mon Sep 17 00:00:00 2001 From: Jonathan Lambrechts <jonathan.lambrechts@uclouvain.be> Date: Tue, 29 May 2012 10:44:44 +0000 Subject: [PATCH] bamg : fix compilation with recent gcc --- contrib/bamg/bamglib/Mesh2.cpp | 4 ++-- contrib/bamg/bamglib/MeshRead.cpp | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/contrib/bamg/bamglib/Mesh2.cpp b/contrib/bamg/bamglib/Mesh2.cpp index 2f99240946..ebfac325df 100644 --- a/contrib/bamg/bamglib/Mesh2.cpp +++ b/contrib/bamg/bamglib/Mesh2.cpp @@ -3201,7 +3201,7 @@ void Triangles::PreInit(Int4 inbvx,char *fname) if (inbvx) { vertices=new Vertex[nbvx]; assert(vertices); - ordre=new (Vertex* [nbvx]); + ordre=new Vertex* [nbvx]; assert(ordre); triangles=new Triangle[nbtx]; assert(triangles);} @@ -3977,7 +3977,7 @@ void Triangles::GeomToTriangles0(Int4 inbvx) Edge** Triangles::MakeGeometricalEdgeToEdge() { assert(Gh.nbe); - Edge **e= new (Edge* [Gh.nbe]); + Edge **e= new Edge* [Gh.nbe]; Int4 i; for ( i=0;i<Gh.nbe ; i++) diff --git a/contrib/bamg/bamglib/MeshRead.cpp b/contrib/bamg/bamglib/MeshRead.cpp index 6c880f12a5..e23f9144f9 100644 --- a/contrib/bamg/bamglib/MeshRead.cpp +++ b/contrib/bamg/bamglib/MeshRead.cpp @@ -119,7 +119,7 @@ void Triangles::Read(MeshIstream & f_in,int Version,Real8 cutoffradian) nbvx=nbv; vertices=new Vertex[nbvx]; assert(vertices); - ordre=new (Vertex* [nbvx]); + ordre=new Vertex* [nbvx]; assert(ordre); nbiv = nbv; @@ -399,7 +399,7 @@ void Triangles::Read_am_fmt(MeshIstream & f_in) triangles =new Triangle[nbtx]; assert(triangles); vertices=new Vertex[nbvx]; - ordre=new (Vertex* [nbvx]); + ordre=new Vertex* [nbvx]; for ( i=0;i<nbt;i++) { @@ -448,7 +448,7 @@ void Triangles::Read_am(MeshIstream &ff) triangles =new Triangle[nbtx]; assert(triangles); vertices=new Vertex[nbvx]; - ordre=new (Vertex* [nbvx]); + ordre=new Vertex* [nbvx]; Int4 i; @@ -547,7 +547,7 @@ void Triangles::Read_nopo(MeshIstream & ff) triangles =new Triangle[nbtx]; assert(triangles); vertices=new Vertex[nbvx]; - ordre=new (Vertex* [nbvx]); + ordre=new Vertex* [nbvx]; f_in >> l; @@ -711,7 +711,7 @@ void Triangles::Read_nopo(MeshIstream & ff) triangles =new Triangle[nbtx]; assert(triangles); vertices=new Vertex[nbvx]; - ordre=new (Vertex* [nbvx]); + ordre=new Vertex* [nbvx]; Int4 k=0; for ( i=0;i<ne;i++) @@ -774,7 +774,7 @@ void Triangles::Read_msh(MeshIstream &f_in) triangles =new Triangle[nbtx]; assert(triangles); vertices=new Vertex[nbvx]; - ordre=new (Vertex* [nbvx]); + ordre=new Vertex* [nbvx]; edges = new Edge[nbe]; for ( i=0;i<nbv;i++) { @@ -822,7 +822,7 @@ void Triangles::Read_amdba(MeshIstream &f_in ) triangles =new Triangle[nbtx]; assert(triangles); vertices=new Vertex[nbvx]; - ordre=new (Vertex* [nbvx]); + ordre=new Vertex* [nbvx]; Int4 j; for ( i=0;i<nbv;i++) { -- GitLab