mirror of https://github.com/CGAL/cgal
use one lambda
This commit is contained in:
parent
5da7e84bab
commit
32b31fdc9b
|
|
@ -906,10 +906,9 @@ void get_precached_poly(int var, const NT& key, int /* level */, Poly_1& poly)
|
|||
// }
|
||||
|
||||
if(not_cached||not_found) {
|
||||
poly = Poly_1(::boost::make_transform_iterator(coeffs->begin(),
|
||||
std::function<NT(const Poly_1&)>([&key1](const Poly_1& poly){ return evaluate(poly, key1); })),
|
||||
::boost::make_transform_iterator(coeffs->end(),
|
||||
std::function<NT(const Poly_1&)>([&key1](const Poly_1& poly){ return evaluate(poly, key1); })));
|
||||
auto fn = [&key1](const Poly_1& poly){ return evaluate(poly, key1); };
|
||||
poly = Poly_1(::boost::make_transform_iterator(coeffs->begin(), fn),
|
||||
::boost::make_transform_iterator(coeffs->end(), fn));
|
||||
if(not_cached)
|
||||
return;
|
||||
// all available space consumed: drop the least recently used entry
|
||||
|
|
|
|||
|
|
@ -109,9 +109,10 @@ struct Transform {
|
|||
typedef typename InputPoly_2::NT NT_in;
|
||||
typedef typename OutputPoly_2::NT NT_out;
|
||||
Transform<NT_out, NT_in, Op> tr;
|
||||
auto fn = [&op, &tr](const NT_in& v){ return tr(v, op); };
|
||||
return OutputPoly_2(
|
||||
::boost::make_transform_iterator(p.begin(), std::function<NT_out(const NT_in&)>([&op, &tr](const NT_in& v){ return tr(v, op); })),
|
||||
::boost::make_transform_iterator(p.end(), std::function<NT_out(const NT_in&)>([&op, &tr](const NT_in& v){ return tr(v, op); })));
|
||||
::boost::make_transform_iterator(p.begin(), fn),
|
||||
::boost::make_transform_iterator(p.end(), fn));
|
||||
}
|
||||
|
||||
OutputPoly_2 operator()(
|
||||
|
|
|
|||
Loading…
Reference in New Issue