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

This commit is contained in:
wmayer
2023-08-15 17:30:08 +02:00
committed by Chris Hennes
parent 8c25886da2
commit 3e09b8ee2d
30 changed files with 126 additions and 132 deletions

View File

@@ -65,12 +65,12 @@ bool ViewProviderMultiTransform::onDelete(const std::vector<std::string> &svec)
std::vector<App::DocumentObject*> transformFeatures = pcMultiTransform->Transformations.getValues();
// if the multitransform object was deleted the transformed features must be deleted, too
for (std::vector<App::DocumentObject*>::const_iterator it = transformFeatures.begin(); it != transformFeatures.end(); ++it)
{
if (*it)
for (auto it : transformFeatures) {
if (it) {
Gui::Command::doCommand(
Gui::Command::Doc,"App.getDocument('%s').removeObject(\"%s\")", \
(*it)->getDocument()->getName(), (*it)->getNameInDocument());
it->getDocument()->getName(), it->getNameInDocument());
}
}
// Handle Originals