From: abn Date: Tue, 22 May 2018 11:09:54 +0000 (+0200) Subject: Fix compilation with C++98 ... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fabn%2Fshould_compile_with_cpp98;p=tools%2Fmedcoupling.git Fix compilation with C++98 ... --- diff --git a/src/INTERP_KERNEL/Interpolation1D0D.txx b/src/INTERP_KERNEL/Interpolation1D0D.txx index 7c62140fe..a89616cc6 100644 --- a/src/INTERP_KERNEL/Interpolation1D0D.txx +++ b/src/INTERP_KERNEL/Interpolation1D0D.txx @@ -114,10 +114,10 @@ namespace INTERP_KERNEL for(unsigned long i = 0 ; i < numSrcElems ; ++i) delete srcElems[i]; return srcMesh.getNumberOfNodes(); - } #else throw INTERP_KERNEL::Exception("Go buying a C++11 compiler :)"); #endif + } } #endif diff --git a/src/MEDCoupling/MEDCouplingSkyLineArray.cxx b/src/MEDCoupling/MEDCouplingSkyLineArray.cxx index e07b195c8..fd00538bf 100644 --- a/src/MEDCoupling/MEDCouplingSkyLineArray.cxx +++ b/src/MEDCoupling/MEDCouplingSkyLineArray.cxx @@ -471,16 +471,16 @@ void MEDCouplingSkyLineArray::replaceSimplePacks(const DataArrayInt* idx, const _values->reAlloc(valSz); iP = _index->getPointer(); vP = _values->getPointer(); - for (auto values : valuesByIdx) + for (std::deque< std::set >::const_iterator values=valuesByIdx.begin(); values!=valuesByIdx.end(); ++values) { - std::copy(values.begin(), values.end(), vP+(*iP)); + std::copy((*values).begin(), (*values).end(), vP+(*iP)); iP++; } } void MEDCouplingSkyLineArray::deleteSimplePacks(const DataArrayInt* idx) { - for (auto id = idx->begin(); id != idx->end(); id++) + for (const int *id = idx->begin(); id != idx->end(); id++) validIndex("deleteSimplePacks", *id); std::set packsToDelete(idx->begin(), idx->end());