FEM: apply std::ranges
This commit is contained in:
@@ -349,9 +349,7 @@ void TaskFemConstraintTransform::addToSelection()
|
||||
}
|
||||
}
|
||||
}
|
||||
for (std::vector<std::string>::iterator itr =
|
||||
std::find(SubElements.begin(), SubElements.end(), subName);
|
||||
itr != SubElements.end();
|
||||
for (auto itr = std::ranges::find(SubElements, subName); itr != SubElements.end();
|
||||
itr = std::find(++itr,
|
||||
SubElements.end(),
|
||||
subName)) { // for every sub element in selection that
|
||||
@@ -433,9 +431,7 @@ void TaskFemConstraintTransform::removeFromSelection()
|
||||
const App::DocumentObject* obj = it.getObject();
|
||||
|
||||
for (const auto& subName : subNames) { // for every selected sub element
|
||||
for (std::vector<std::string>::iterator itr =
|
||||
std::find(SubElements.begin(), SubElements.end(), subName);
|
||||
itr != SubElements.end();
|
||||
for (auto itr = std::ranges::find(SubElements, subName); itr != SubElements.end();
|
||||
itr = std::find(++itr,
|
||||
SubElements.end(),
|
||||
subName)) { // for every sub element in selection that
|
||||
@@ -450,7 +446,7 @@ void TaskFemConstraintTransform::removeFromSelection()
|
||||
}
|
||||
}
|
||||
}
|
||||
std::sort(itemsToDel.begin(), itemsToDel.end());
|
||||
std::ranges::sort(itemsToDel);
|
||||
while (!itemsToDel.empty()) {
|
||||
Objects.erase(Objects.begin() + itemsToDel.back());
|
||||
SubElements.erase(SubElements.begin() + itemsToDel.back());
|
||||
|
||||
Reference in New Issue
Block a user