]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove a usage of boost::bind. 4718/head
authorDavid Wells <wellsd2@rpi.edu>
Mon, 7 Aug 2017 23:40:48 +0000 (19:40 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Tue, 8 Aug 2017 00:19:08 +0000 (20:19 -0400)
include/deal.II/opencascade/utilities.h
source/opencascade/utilities.cc

index cb6d71e71e12594d794764f1b769ed6273a018fe..c68a0fe42fbe191f41b536ae94f3385ffced0696 100644 (file)
@@ -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);
 
 
   /**
index e3feaffbd8ba6ebb649ca9d139fdb54710b6db40..4ced09c483782cc1b4efdce7d8933622b97a1f04 100644 (file)
@@ -21,8 +21,6 @@
 #include <deal.II/base/utilities.h>
 #include <deal.II/base/exceptions.h>
 
-#include <boost/bind.hpp>
-
 #include <cstdio>
 #include <iostream>
 #include <set>
@@ -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

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.