Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Replace redundant type with "auto" (src/smpi/).
[simgrid.git] / src / smpi / bindings / smpi_f77_coll.cpp
index 5029643..0db71ca 100644 (file)
@@ -119,8 +119,8 @@ void mpi_reduce_scatter_block_ (void *sendbuf, void *recvbuf, int* recvcount, in
 void mpi_alltoallw_ ( void *sendbuf, int *sendcnts, int *sdispls, int* old_sendtypes, void *recvbuf, int *recvcnts,
                       int *rdispls, int* old_recvtypes, int* comm, int* ierr){
   int size = simgrid::smpi::Comm::f2c(*comm)->size();
-  MPI_Datatype* sendtypes = new MPI_Datatype[size];
-  MPI_Datatype* recvtypes = new MPI_Datatype[size];
+  auto* sendtypes = new MPI_Datatype[size];
+  auto* recvtypes = new MPI_Datatype[size];
   for(int i=0; i< size; i++){
     if(FORT_IN_PLACE(sendbuf)!=MPI_IN_PLACE)
       sendtypes[i] = simgrid::smpi::Datatype::f2c(old_sendtypes[i]);
@@ -301,8 +301,8 @@ void mpi_ialltoallw_ ( void *sendbuf, int *sendcnts, int *sdispls, int* old_send
                       int *rdispls, int* old_recvtypes, int* comm, int* request, int* ierr){
   MPI_Request req;
   int size = simgrid::smpi::Comm::f2c(*comm)->size();
-  MPI_Datatype* sendtypes = new MPI_Datatype[size];
-  MPI_Datatype* recvtypes = new MPI_Datatype[size];
+  auto* sendtypes = new MPI_Datatype[size];
+  auto* recvtypes = new MPI_Datatype[size];
   for(int i=0; i< size; i++){
     if(FORT_IN_PLACE(sendbuf)!=MPI_IN_PLACE)
       sendtypes[i] = simgrid::smpi::Datatype::f2c(old_sendtypes[i]);