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

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

View File

@@ -2465,7 +2465,7 @@ bool Document::afterRestore(const std::vector<DocumentObject*>& objArray, bool c
// partial document touched, signal full reload
return false;
}
else if (!d->touchedObjs.count(obj)) {
else if (!d->touchedObjs.contains(obj)) {
obj->purgeTouched();
}
@@ -3065,7 +3065,7 @@ int Document::recompute(const std::vector<App::DocumentObject*>& objs,
for (size_t i = 0; i < topoSortedObjects.size(); ++i) {
auto obj = topoSortedObjects[i];
obj->setStatus(ObjectStatus::Recompute2, false);
if (!filter.count(obj) && obj->isTouched()) {
if (!filter.contains(obj) && obj->isTouched()) {
if (passes > 0) {
FC_ERR(obj->getFullName() << " still touched after recompute");
}