From 1761596a1803e2a70ba38d96feacf4ec42981736 Mon Sep 17 00:00:00 2001 From: David Wells Date: Mon, 7 Aug 2017 19:40:48 -0400 Subject: [PATCH] Remove a usage of boost::bind. --- include/deal.II/opencascade/utilities.h | 7 ++++--- source/opencascade/utilities.cc | 12 +++++++----- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/include/deal.II/opencascade/utilities.h b/include/deal.II/opencascade/utilities.h index cb6d71e71e..c68a0fe42f 100644 --- a/include/deal.II/opencascade/utilities.h +++ b/include/deal.II/opencascade/utilities.h @@ -329,9 +329,10 @@ namespace OpenCASCADE * optional parameter is used as a relative tolerance when comparing * objects. */ - bool point_compare(const Point<3> &p1, const Point<3> &p2, - const Tensor<1,3> &direction=Tensor<1,3>(), - const double tolerance=1e-10); + bool point_compare(const Point<3> &p1, + const Point<3> &p2, + const Tensor<1,3> &direction = Tensor<1,3>(), + const double tolerance = 1e-10); /** diff --git a/source/opencascade/utilities.cc b/source/opencascade/utilities.cc index e3feaffbd8..4ced09c483 100644 --- a/source/opencascade/utilities.cc +++ b/source/opencascade/utilities.cc @@ -21,8 +21,6 @@ #include #include -#include - #include #include #include @@ -178,9 +176,10 @@ namespace OpenCASCADE return Point<3>(p.X(), p.Y(), p.Z()); } - bool point_compare(const Point<3> &p1, const Point<3> &p2, + bool point_compare(const Point<3> &p1, + const Point<3> &p2, const Tensor<1,3> &direction, - const double tolerance) + const double tolerance) { const double rel_tol=std::max(tolerance, std::max(p1.norm(), p2.norm())*tolerance); if (direction.norm() > 0.0) @@ -440,7 +439,10 @@ namespace OpenCASCADE if (direction*direction > 0) { std::sort(curve_points.begin(), curve_points.end(), - boost::bind(&OpenCASCADE::point_compare, _1, _2, direction, tolerance)); + [&](const Point<3> &p1, const Point<3> &p2) + { + return OpenCASCADE::point_compare(p1, p2, direction, tolerance); + }); } // set up array of vertices -- 2.39.5