mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-09 23:24:02 +00:00
Fix coding style, simplify, use mutable point type for envelope box in covered_by.
This commit is contained in:
parent
016e23b85a
commit
62c827ee9d
@ -66,7 +66,8 @@ struct geometry_covered_by_box
|
||||
static inline bool apply(Geometry const& geometry, Box const& box, Strategy const& strategy)
|
||||
{
|
||||
using point_type = typename point_type<Geometry>::type;
|
||||
using box_type = model::box<point_type>;
|
||||
using mutable_point_type = typename helper_geometry<point_type>::type;
|
||||
using box_type = model::box<mutable_point_type>;
|
||||
|
||||
// TODO: this is not optimal since the process should be able to terminate if a point is found
|
||||
// outside of the box without computing the whole envelope
|
||||
|
@ -28,7 +28,7 @@ struct box_areal
|
||||
|
||||
template <typename Result, typename Strategy>
|
||||
static inline void apply(Box const& box, Areal const& areal,
|
||||
Result & result,
|
||||
Result& result,
|
||||
Strategy const& strategy)
|
||||
{
|
||||
using is_cartesian = std::is_same
|
||||
@ -41,18 +41,18 @@ struct box_areal
|
||||
|
||||
template <typename Result, typename Strategy>
|
||||
static inline void apply(Box const& box, Areal const& areal,
|
||||
Result & result,
|
||||
Result& result,
|
||||
Strategy const& strategy,
|
||||
std::true_type /*is_cartesian*/)
|
||||
{
|
||||
using box_view = boost::geometry::box_view<Box>;
|
||||
box_view view(box);
|
||||
areal_areal<decltype(view), Areal>::apply(view, areal, result, strategy);
|
||||
areal_areal<box_view, Areal>::apply(view, areal, result, strategy);
|
||||
}
|
||||
|
||||
template <typename Result, typename Strategy>
|
||||
static inline void apply(Box const& box, Areal const& areal,
|
||||
Result & result,
|
||||
Result& result,
|
||||
Strategy const& strategy,
|
||||
std::false_type /*is_cartesian*/)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user