From 64caea207394bb05587c8ffb29b7a3e8696d24df Mon Sep 17 00:00:00 2001 From: Uwe Date: Wed, 25 Jan 2023 03:43:45 +0100 Subject: [PATCH] modernize a for loop --- src/Mod/Part/Gui/SectionCutting.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Mod/Part/Gui/SectionCutting.cpp b/src/Mod/Part/Gui/SectionCutting.cpp index 9c59cc5ba2..47c1a36419 100644 --- a/src/Mod/Part/Gui/SectionCutting.cpp +++ b/src/Mod/Part/Gui/SectionCutting.cpp @@ -151,9 +151,8 @@ SectionCut::SectionCut(QWidget* parent) // the cutting is started when only an existing cut was visible std::vector compoundObjects; pcCompound->Links.getLinks(compoundObjects); - for (auto itCompound = compoundObjects.begin(); itCompound != compoundObjects.end(); - itCompound++) { - App::Link* pcLink = dynamic_cast(*itCompound); + for (auto aCompoundObj : compoundObjects) { + App::Link* pcLink = dynamic_cast(aCompoundObj); auto LinkedObject = pcLink->getLink(); // only if not already visible if (!(LinkedObject->Visibility.getValue())) {