Kaydet (Commit) 32b54f97 authored tarafından Mario J. Rugiero's avatar Mario J. Rugiero Kaydeden (comit) Noel Grandin

Replace boost::bind by lambdas in basegfx tree.

Change-Id: I8f72bec11b5dfd71cc60a18b980629c176d43f49
Reviewed-on: https://gerrit.libreoffice.org/19595Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst e6dce260
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include <basegfx/tuple/b2dtuple.hxx> #include <basegfx/tuple/b2dtuple.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx> #include <basegfx/polygon/b2dpolypolygon.hxx>
#include <boost/bind.hpp>
#include <algorithm> #include <algorithm>
#include <vector> #include <vector>
...@@ -80,9 +79,7 @@ namespace basegfx ...@@ -80,9 +79,7 @@ namespace basegfx
const std::vector<B2DRange>::const_iterator aEnd( maRanges.end() ); const std::vector<B2DRange>::const_iterator aEnd( maRanges.end() );
return std::any_of( maRanges.begin(), return std::any_of( maRanges.begin(),
aEnd, aEnd,
boost::bind<bool>( boost::mem_fn( &B2DRange::overlaps ), [&rRange](const B2DRange& aRange) { return aRange.overlaps(rRange); } );
_1,
boost::cref(rRange) ) );
} }
B2DPolyPolygon solveCrossovers() const B2DPolyPolygon solveCrossovers() const
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <basegfx/polygon/b2dpolypolygontools.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <o3tl/vector_pool.hxx> #include <o3tl/vector_pool.hxx>
#include <boost/bind.hpp>
#include <boost/next_prior.hpp> #include <boost/next_prior.hpp>
#include <algorithm> #include <algorithm>
...@@ -496,11 +495,7 @@ namespace basegfx ...@@ -496,11 +495,7 @@ namespace basegfx
B2DPolygon aRes; B2DPolygon aRes;
std::for_each( maPoints.begin(), std::for_each( maPoints.begin(),
maPoints.end(), maPoints.end(),
boost::bind( [&aRes](const B2DPoint& aPoint) mutable { aRes.append(aPoint, 1); });
&B2DPolygon::append,
boost::ref(aRes),
_1,
1 ) );
aRes.setClosed( true ); aRes.setClosed( true );
return aRes; return aRes;
} }
...@@ -748,10 +743,7 @@ namespace basegfx ...@@ -748,10 +743,7 @@ namespace basegfx
// rect is regarded _outside_ any rects whose events have // rect is regarded _outside_ any rects whose events have
// started earlier // started earlier
first = std::find_if(first, last, first = std::find_if(first, last,
boost::bind( [&rCurrRect](ActiveEdge& anEdge) { return isSameRect(anEdge, rCurrRect); });
&isSameRect,
_1,
boost::cref(rCurrRect)));
if(first == last) if(first == last)
return; return;
...@@ -907,12 +899,11 @@ namespace basegfx ...@@ -907,12 +899,11 @@ namespace basegfx
std::for_each( aSweepLineEvents.begin(), std::for_each( aSweepLineEvents.begin(),
aSweepLineEvents.end(), aSweepLineEvents.end(),
boost::bind( [&](SweepLineEvent& aSweepLineEvent) mutable { handleSweepLineEvent(
&handleSweepLineEvent, aSweepLineEvent,
_1, aActiveEdgeList,
boost::ref(aActiveEdgeList), aPolygonPool,
boost::ref(aPolygonPool), aRes); } );
boost::ref(aRes)) );
return aRes; return aRes;
} }
......
...@@ -35,8 +35,6 @@ ...@@ -35,8 +35,6 @@
#include <basegfx/numeric/ftools.hxx> #include <basegfx/numeric/ftools.hxx>
#include <comphelper/random.hxx> #include <comphelper/random.hxx>
#include <boost/bind.hpp>
#include <boxclipper.hxx> #include <boxclipper.hxx>
using namespace ::basegfx; using namespace ::basegfx;
...@@ -168,14 +166,9 @@ public: ...@@ -168,14 +166,9 @@ public:
OUString::createFromAscii(randomSvg), false, 0); OUString::createFromAscii(randomSvg), false, 0);
std::for_each(randomPoly.begin(), std::for_each(randomPoly.begin(),
randomPoly.end(), randomPoly.end(),
boost::bind( [this](const B2DPolygon& aPolygon) mutable {
&B2DPolyRange::appendElement, this->aRandomIntersections.appendElement(aPolygon.getB2DRange(),
boost::ref(aRandomIntersections), B2VectorOrientation::Negative, 1); } );
boost::bind(
&B2DPolygon::getB2DRange,
_1),
B2VectorOrientation::Negative,
1));
#endif #endif
} }
...@@ -223,14 +216,9 @@ public: ...@@ -223,14 +216,9 @@ public:
// now, sort all polygons with increasing 0th point // now, sort all polygons with increasing 0th point
std::sort(aRes.begin(), std::sort(aRes.begin(),
aRes.end(), aRes.end(),
boost::bind( [](const B2DPolygon& aPolygon1, const B2DPolygon& aPolygon2) {
&compare, return compare(aPolygon1.getB2DPoint(0),
boost::bind( aPolygon2.getB2DPoint(0)); } );
&B2DPolygon::getB2DPoint,
_1,0),
boost::bind(
&B2DPolygon::getB2DPoint,
_2,0)));
return aRes; return aRes;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment