Part: apply std::ranges

This commit is contained in:
bofdahof
2025-03-12 20:02:29 +10:00
committed by Chris Hennes
parent 216a76e971
commit 2ddd24bc6d
5 changed files with 27 additions and 34 deletions

View File

@@ -134,9 +134,8 @@ void DlgBooleanOperation::slotCreatedObject(const App::DocumentObject& obj)
void DlgBooleanOperation::slotChangedObject(const App::DocumentObject& obj,
const App::Property& prop)
{
std::list<const App::DocumentObject*>::iterator it;
it = std::find(observe.begin(), observe.end(), &obj);
if (it != observe.end() && prop.is<Part::PropertyPartShape>()) {
if (const auto it = std::ranges::find(observe, &obj);
it != observe.end() && prop.is<Part::PropertyPartShape>()) {
const TopoDS_Shape& shape = static_cast<const Part::PropertyPartShape&>(prop).getValue();
if (!shape.IsNull()) {
Gui::Document* activeGui = Gui::Application::Instance->getDocument(obj.getDocument());