X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling%2FTest%2FMEDCouplingBasicsTest2.cxx;h=f9c73195fb048696164b87530e2296b99cdd26b2;hb=b832b15337be013a56e0976170e5e235b89fcb03;hp=ad26e83148bb277d234182abfd7e3e2cf3146018;hpb=e4063d87dbb8dad309dc1880af096d521934cf24;p=tools%2Fmedcoupling.git diff --git a/src/MEDCoupling/Test/MEDCouplingBasicsTest2.cxx b/src/MEDCoupling/Test/MEDCouplingBasicsTest2.cxx index ad26e8314..f9c73195f 100644 --- a/src/MEDCoupling/Test/MEDCouplingBasicsTest2.cxx +++ b/src/MEDCoupling/Test/MEDCouplingBasicsTest2.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D +// Copyright (C) 2007-2024 CEA, EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -2077,7 +2077,7 @@ void MEDCouplingBasicsTest2::testFillFromAnalytic3() double values1[5]={-0.1,0.23333333333333336,0.56666666666666665,0.4,0.9}; const double *tmp=f1->getArray()->getConstPointer(); std::transform(tmp,tmp+5,values1,values1,std::minus()); - std::transform(values1,values1+5,values1,std::ptr_fun(fabs)); + std::transform(values1,values1+5,values1,[](double c){return fabs(c);}); double max=*std::max_element(values1,values1+5); CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,max,1.e-12); f1->decrRef(); @@ -2094,7 +2094,7 @@ void MEDCouplingBasicsTest2::testFillFromAnalytic3() double values2[9]={-0.9,0.1,1.1,-0.4,0.6,1.6,0.1,1.1,2.1}; tmp=f1->getArray()->getConstPointer(); std::transform(tmp,tmp+9,values2,values2,std::minus()); - std::transform(values2,values2+9,values2,std::ptr_fun(fabs)); + std::transform(values2,values2+9,values2,[](double c){return fabs(c);}); max=*std::max_element(values2,values2+9); CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,max,1.e-12); f1->decrRef(); @@ -2111,12 +2111,12 @@ void MEDCouplingBasicsTest2::testFillFromAnalytic3() double values2Bis[9]={-0.9,0.1,1.1,-0.4,0.6,1.6,0.1,1.1,2.1}; double values2BisBis[9]; std::transform(tmp,tmp+9,values2Bis,values2BisBis,std::minus()); - std::transform(values2,values2+9,values2BisBis,std::ptr_fun(fabs)); + std::transform(values2,values2+9,values2BisBis,[](double c){return fabs(c);}); max=*std::max_element(values2BisBis,values2BisBis+9); CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,max,1.e-12); tmp=f1->getEndArray()->getConstPointer(); std::transform(tmp,tmp+9,values2Bis,values2BisBis,std::minus()); - std::transform(values2,values2+9,values2BisBis,std::ptr_fun(fabs)); + std::transform(values2,values2+9,values2BisBis,[](double c){return fabs(c);}); max=*std::max_element(values2BisBis,values2BisBis+9); CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,max,1.e-12); f1->decrRef(); @@ -2132,7 +2132,7 @@ void MEDCouplingBasicsTest2::testFillFromAnalytic3() double values3[18]={-0.6,-1.2,-0.1,-0.2,0.4,0.8,-0.1,-0.2,0.4,0.8,0.9,1.8,0.4,0.8,0.9,1.8,1.4,2.8}; tmp=f1->getArray()->getConstPointer(); std::transform(tmp,tmp+18,values3,values3,std::minus()); - std::transform(values3,values3+18,values3,std::ptr_fun(fabs)); + std::transform(values3,values3+18,values3,[](double c){return fabs(c);}); max=*std::max_element(values3,values3+18); CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,max,1.e-12); double values4[2]; @@ -2240,9 +2240,9 @@ void MEDCouplingBasicsTest2::testAreaBary3D2() mcIdType tmpConn[8]={0,1,2,3,4,5,6,7}; mesh->allocateCells(3); mesh->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,tmpConn); - std::transform(tmpConn,tmpConn+8,tmpConn,std::bind2nd(std::plus(),8)); + std::transform(tmpConn,tmpConn+8,tmpConn,std::bind(std::plus(),std::placeholders::_1,8)); mesh->insertNextCell(INTERP_KERNEL::NORM_PENTA6,6,tmpConn); - std::transform(tmpConn,tmpConn+8,tmpConn,std::bind2nd(std::plus(),6)); + std::transform(tmpConn,tmpConn+8,tmpConn,std::bind(std::plus(),std::placeholders::_1,6)); mesh->insertNextCell(INTERP_KERNEL::NORM_PYRA5,5,tmpConn); mesh->finishInsertingCells(); mesh->checkConsistencyLight();