App: apply std::ranges

This commit is contained in:
bofdahof
2025-03-12 17:46:30 +10:00
committed by Chris Hennes
parent f9fd8b299c
commit 59c3bbe5c2
9 changed files with 25 additions and 27 deletions

View File

@@ -1232,17 +1232,15 @@ void PropertyExpressionEngine::getLinksTo(std::vector<App::ObjectIdentifier>& id
identifiers.push_back(expressionId);
break;
}
if (std::any_of(paths.begin(),
paths.end(),
[subname, obj, sobj, &subElement](const auto& path) {
if (path.getSubObjectName() == subname) {
return true;
}
if (std::ranges::any_of(paths, [subname, obj, sobj, &subElement](const auto& path) {
if (path.getSubObjectName() == subname) {
return true;
}
App::SubObjectT sobjT(obj, path.getSubObjectName().c_str());
return (sobjT.getSubObject() == sobj
&& sobjT.getOldElementName() == subElement);
})) {
App::SubObjectT sobjT(obj, path.getSubObjectName().c_str());
return (sobjT.getSubObject() == sobj
&& sobjT.getOldElementName() == subElement);
})) {
identifiers.push_back(expressionId);
}
}