Part: modernize C++: use range-based for loop

This commit is contained in:
wmayer
2023-08-15 17:28:50 +02:00
committed by Chris Hennes
parent 9a1f8a11d6
commit 312975edba
49 changed files with 364 additions and 365 deletions

View File

@@ -68,11 +68,11 @@ App::DocumentObjectExecReturn *Compound::execute()
std::set<DocumentObject*> tempLinks;
const std::vector<DocumentObject*>& links = Links.getValues();
for (std::vector<DocumentObject*>::const_iterator it = links.begin(); it != links.end(); ++it) {
if (*it) {
auto pos = tempLinks.insert(*it);
for (auto link : links) {
if (link) {
auto pos = tempLinks.insert(link);
if (pos.second) {
const TopoDS_Shape& sh = Feature::getShape(*it);
const TopoDS_Shape& sh = Feature::getShape(link);
if (!sh.IsNull()) {
builder.Add(comp, sh);
TopTools_IndexedMapOfShape faceMap;