App: use contains() instead of count() where possible

This commit is contained in:
Benjamin Nauck
2025-03-10 21:36:17 +01:00
parent c0e03c42da
commit 02d095f6e2
8 changed files with 44 additions and 44 deletions

View File

@@ -873,7 +873,7 @@ PropertyExpressionEngine::validateExpression(const ObjectIdentifier& path,
auto inList = pathDocObj->getInListEx(true);
for (auto& v : expr->getDepObjects()) {
auto docObj = v.first;
if (!v.second && inList.count(docObj)) {
if (!v.second && inList.contains(docObj)) {
std::stringstream ss;
ss << "cyclic reference to " << docObj->getFullName();
return ss.str();
@@ -1008,7 +1008,7 @@ bool PropertyExpressionEngine::adjustLink(const std::set<DocumentObject*>& inLis
}
bool found = false;
for (auto& v : _Deps) {
if (inList.count(v.first)) {
if (inList.contains(v.first)) {
found = true;
break;
}