C++11: replace deprecated function std::bind2nd with lambda functions

This commit is contained in:
wmayer
2020-10-15 14:46:02 +02:00
parent d8bbced84e
commit 56c6db10e0
11 changed files with 59 additions and 40 deletions

View File

@@ -1158,7 +1158,7 @@ bool MeshEvalRangePoint::Evaluate()
unsigned long ulCtPoints = _rclMesh.CountPoints();
for (MeshFacetArray::_TConstIterator it = rFaces.begin(); it != rFaces.end(); ++it) {
if (std::find_if(it->_aulPoints, it->_aulPoints + 3, std::bind2nd(std::greater_equal<unsigned long>(), ulCtPoints)) < it->_aulPoints + 3)
if (std::find_if(it->_aulPoints, it->_aulPoints + 3, [ulCtPoints](unsigned long i) { return i >= ulCtPoints; }) < it->_aulPoints + 3)
return false;
}
@@ -1173,7 +1173,7 @@ std::vector<unsigned long> MeshEvalRangePoint::GetIndices() const
unsigned long ind=0;
for (MeshFacetArray::_TConstIterator it = rFaces.begin(); it != rFaces.end(); ++it, ind++) {
if (std::find_if(it->_aulPoints, it->_aulPoints + 3, std::bind2nd(std::greater_equal<unsigned long>(), ulCtPoints)) < it->_aulPoints + 3)
if (std::find_if(it->_aulPoints, it->_aulPoints + 3, [ulCtPoints](unsigned long i) { return i >= ulCtPoints; }) < it->_aulPoints + 3)
aInds.push_back(ind);
}