Part: use empty() and isEmpty() instead of count() where possible

This commit is contained in:
Benjamin Nauck
2025-03-12 16:01:14 +01:00
parent e69c372056
commit b9ee64792d
4 changed files with 9 additions and 4 deletions

View File

@@ -860,7 +860,7 @@ void TopoShape::mapSubElementForShape(const TopoShape& other, const char* op)
for (auto type : types) {
auto& shapeMap = _cache->getAncestry(type);
auto& otherMap = other._cache->getAncestry(type);
if ((shapeMap.count() == 0) || (otherMap.count() == 0)) {
if ((shapeMap.empty()) || (otherMap.empty())) {
continue;
}
@@ -1450,7 +1450,7 @@ TopoShape& TopoShape::makeShapeWithElementMap(const TopoDS_Shape& shape,
continue;
}
auto& otherMap = incomingShape._cache->getAncestry(info.type);
if (otherMap.count() == 0) {
if (otherMap.empty()) {
continue;
}
for (int i = 1; i <= otherMap.count(); i++) {