Fix coding style, simplify, use mutable point type for envelope box in covered_by.

This commit is contained in:
Vissarion Fisikopoulos 2022-10-13 11:08:04 +03:00
parent 016e23b85a
commit 62c827ee9d
2 changed files with 6 additions and 5 deletions

View File

@ -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

View File

@ -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*/)
{