From e7a90810975fdc74ced33c30124647cf1e3ff9e7 Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 21 Jun 2022 15:23:47 +0200 Subject: [PATCH] Mesh: replace boost::bind with std::bind --- src/Mod/Mesh/App/Core/Curvature.cpp | 6 +++--- src/Mod/Mesh/Gui/MeshEditor.cpp | 6 +++--- src/Mod/Mesh/Gui/ViewProvider.cpp | 15 +++++++-------- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/Mod/Mesh/App/Core/Curvature.cpp b/src/Mod/Mesh/App/Core/Curvature.cpp index 6f29347191..846268ffc4 100644 --- a/src/Mod/Mesh/App/Core/Curvature.cpp +++ b/src/Mod/Mesh/App/Core/Curvature.cpp @@ -23,12 +23,12 @@ #include "PreCompiled.h" #ifndef _PreComp_ # include +# include #endif #include #include #include -#include //#define OPTIMIZE_CURVATURE #ifdef OPTIMIZE_CURVATURE @@ -48,7 +48,7 @@ #include using namespace MeshCore; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; MeshCurvature::MeshCurvature(const MeshKernel& kernel) : myKernel(kernel), myMinPoints(20), myRadius(0.5f) @@ -80,7 +80,7 @@ void MeshCurvature::ComputePerFace(bool parallel) } else { QFuture future = QtConcurrent::mapped - (mySegment, boost::bind(&FacetCurvature::Compute, &face, bp::_1)); + (mySegment, std::bind(&FacetCurvature::Compute, &face, sp::_1)); QFutureWatcher watcher; watcher.setFuture(future); watcher.waitForFinished(); diff --git a/src/Mod/Mesh/Gui/MeshEditor.cpp b/src/Mod/Mesh/Gui/MeshEditor.cpp index 7bf35c8b98..69ebebb297 100644 --- a/src/Mod/Mesh/Gui/MeshEditor.cpp +++ b/src/Mod/Mesh/Gui/MeshEditor.cpp @@ -24,6 +24,7 @@ #ifndef _PreComp_ # include +# include # include # include # include @@ -45,7 +46,6 @@ # include # include # include -# include #endif #include "MeshEditor.h" @@ -61,7 +61,7 @@ #include using namespace MeshGui; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; PROPERTY_SOURCE(MeshGui::ViewProviderFace, Gui::ViewProviderDocumentObject) @@ -478,7 +478,7 @@ void MeshFillHole::startEditing(MeshGui::ViewProviderMesh* vp) viewer->addEventCallback(SoEvent::getClassTypeId(), MeshFillHole::fileHoleCallback, this); myConnection = App::GetApplication().signalChangedObject.connect( - boost::bind(&MeshFillHole::slotChangedObject, this, bp::_1, bp::_2)); + std::bind(&MeshFillHole::slotChangedObject, this, sp::_1, sp::_2)); Gui::coinRemoveAllChildren(myBoundariesRoot); myBoundariesRoot->addChild(viewer->getHeadlight()); diff --git a/src/Mod/Mesh/Gui/ViewProvider.cpp b/src/Mod/Mesh/Gui/ViewProvider.cpp index 810566d710..503a7aa736 100644 --- a/src/Mod/Mesh/Gui/ViewProvider.cpp +++ b/src/Mod/Mesh/Gui/ViewProvider.cpp @@ -57,7 +57,6 @@ #include #include #include -#include /// Here the FreeCAD includes sorted by Base,App,Gui...... #include @@ -108,7 +107,7 @@ using namespace MeshGui; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; using Mesh::Feature; using MeshCore::MeshKernel; @@ -742,19 +741,19 @@ void ViewProviderMesh::setupContextMenu(QMenu* menu, QObject* receiver, const ch act->setCheckable(true); act->setChecked(pcMatBinding->value.getValue() == SoMaterialBinding::PER_FACE && highlightMode == HighlighMode::Component); - func->toggle(act, boost::bind(&ViewProviderMesh::setHighlightedComponents, this, bp::_1)); + func->toggle(act, std::bind(&ViewProviderMesh::setHighlightedComponents, this, sp::_1)); QAction* seg = menu->addAction(QObject::tr("Display segments")); seg->setCheckable(true); seg->setChecked(pcMatBinding->value.getValue() == SoMaterialBinding::PER_FACE && highlightMode == HighlighMode::Segment); - func->toggle(seg, boost::bind(&ViewProviderMesh::setHighlightedSegments, this, bp::_1)); + func->toggle(seg, std::bind(&ViewProviderMesh::setHighlightedSegments, this, sp::_1)); QAction* col = menu->addAction(QObject::tr("Display colors")); col->setVisible(canHighlightColors()); col->setCheckable(true); col->setChecked(highlightMode == HighlighMode::Color); - func->toggle(col, boost::bind(&ViewProviderMesh::setHighlightedColors, this, bp::_1)); + func->toggle(col, std::bind(&ViewProviderMesh::setHighlightedColors, this, sp::_1)); } bool ViewProviderMesh::setEdit(int ModNum) @@ -959,7 +958,7 @@ void ViewProviderMesh::clipMeshCallback(void * ud, SoEventCallback * n) Gui::TimerFunction* func = new Gui::TimerFunction(); func->setAutoDelete(true); MeshSplit* split = new MeshSplit(self, clPoly, proj); - func->setFunction(boost::bind(&MeshSplit::cutMesh, split)); + func->setFunction(std::bind(&MeshSplit::cutMesh, split)); QTimer::singleShot(0, func, SLOT(timeout())); } } @@ -1020,7 +1019,7 @@ void ViewProviderMesh::trimMeshCallback(void * ud, SoEventCallback * n) Gui::TimerFunction* func = new Gui::TimerFunction(); func->setAutoDelete(true); MeshSplit* split = new MeshSplit(self, clPoly, proj); - func->setFunction(boost::bind(&MeshSplit::trimMesh, split)); + func->setFunction(std::bind(&MeshSplit::trimMesh, split)); QTimer::singleShot(0, func, SLOT(timeout())); } } @@ -1394,7 +1393,7 @@ std::vector ViewProviderMesh::getVisibleFacets(const SbViewpor Vertex v(kernel, grid, Base::convertTo(pos)); QFuture future = QtConcurrent::mapped - (points, boost::bind(&Vertex::visible, &v, bp::_1)); + (points, std::bind(&Vertex::visible, &v, bp::_1)); QFutureWatcher watcher; watcher.setFuture(future); watcher.waitForFinished();