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

@@ -113,9 +113,10 @@ bool ViewProviderBoolean::onDelete(const std::vector<std::string> &s)
// if abort command deleted the object the bodies are visible again
std::vector<App::DocumentObject*> bodies = pcBoolean->Group.getValues();
for (std::vector<App::DocumentObject*>::const_iterator b = bodies.begin(); b != bodies.end(); b++) {
if (*b && Gui::Application::Instance->getViewProvider(*b))
Gui::Application::Instance->getViewProvider(*b)->show();
for (auto body : bodies) {
if (auto vp = Gui::Application::Instance->getViewProvider(body)) {
vp->show();
}
}
return ViewProvider::onDelete(s);