diff --git a/include/boost/geometry/algorithms/detail/closest_points/implementation.hpp b/include/boost/geometry/algorithms/detail/closest_points/implementation.hpp index a2870830d..25dd7d075 100644 --- a/include/boost/geometry/algorithms/detail/closest_points/implementation.hpp +++ b/include/boost/geometry/algorithms/detail/closest_points/implementation.hpp @@ -10,7 +10,6 @@ #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_CLOSEST_POINTS_IMPLEMENTATION_HPP #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_CLOSEST_POINTS_IMPLEMENTATION_HPP -// the implementation details #include #include //#include diff --git a/include/boost/geometry/algorithms/detail/closest_points/point_to_geometry.hpp b/include/boost/geometry/algorithms/detail/closest_points/point_to_geometry.hpp index b900d93d3..d7a3c3c99 100644 --- a/include/boost/geometry/algorithms/detail/closest_points/point_to_geometry.hpp +++ b/include/boost/geometry/algorithms/detail/closest_points/point_to_geometry.hpp @@ -127,7 +127,7 @@ public: cd_min); auto closest_point = strategies.closest_points(point, range) - .apply(point, *it_pair.first, *it_pair.second); + .apply(point, it_pair->first, it_pair->second); set_segment_from_points::apply(point, closest_point, shortest_seg); } diff --git a/include/boost/geometry/strategies/closest_points/cartesian.hpp b/include/boost/geometry/strategies/closest_points/cartesian.hpp index 46fb82134..00e4a58fa 100644 --- a/include/boost/geometry/strategies/closest_points/cartesian.hpp +++ b/include/boost/geometry/strategies/closest_points/cartesian.hpp @@ -47,32 +47,6 @@ struct cartesian { return strategy::closest_points::projected_point(); } -/* - template - static auto closest_points(Geometry1 const&, Geometry2 const&, - distance::detail::enable_if_pb_t * = nullptr) - { - return strategy::distance::pythagoras_point_box(); - } - - template - static auto closest_points(Geometry1 const&, Geometry2 const&, - distance::detail::enable_if_sb_t * = nullptr) - { - return strategy::distance::cartesian_segment_box - < - CalculationType, - strategy::distance::pythagoras - >(); - } - - template - static auto closest_points(Geometry1 const&, Geometry2 const&, - distance::detail::enable_if_bb_t * = nullptr) - { - return strategy::distance::pythagoras_box_box(); - } -*/ }; diff --git a/test/algorithms/closest_points/common.hpp b/test/algorithms/closest_points/common.hpp index ed558c1b0..99dd2c969 100644 --- a/test/algorithms/closest_points/common.hpp +++ b/test/algorithms/closest_points/common.hpp @@ -60,14 +60,14 @@ using cartesian = bg::strategies::closest_points::cartesian; template static inline Segment swap(Segment const& s) { - Segment s_swaped; + Segment swapped; - bg::set<0, 0>(s_swaped, bg::get<1, 0>(s)); - bg::set<0, 1>(s_swaped, bg::get<1, 1>(s)); - bg::set<1, 0>(s_swaped, bg::get<0, 0>(s)); - bg::set<1, 1>(s_swaped, bg::get<0, 1>(s)); + bg::set<0, 0>(swapped, bg::get<1, 0>(s)); + bg::set<0, 1>(swapped, bg::get<1, 1>(s)); + bg::set<1, 0>(swapped, bg::get<0, 0>(s)); + bg::set<1, 1>(swapped, bg::get<0, 1>(s)); - return s_swaped; + return swapped; } template @@ -102,7 +102,7 @@ void compute_result(Geometry1 const& geometry1, Geometry2 const& geometry2, Segment const& exp_resulting_segment, Strategy const& strategy, - bool const& default_strategy) + bool default_strategy) { #ifdef BOOST_GEOMETRY_TEST_DEBUG_CLOSEST_POINTS //std::cout << "CS: " << typeid(typename bg::cs_tag::type).name() @@ -137,14 +137,13 @@ void compute_result(Geometry1 const& geometry1, Geometry2 const& geometry2, Segment const& exp_resulting_segment, Strategy const& strategy, - bool const& swap_geometries, - bool const& default_strategy) + bool swap_geometries, + bool default_strategy) { compute_result(geometry1, geometry2, exp_resulting_segment, strategy, default_strategy); if (swap_geometries) { - //TODO: enable // swap input geometries and expected segment compute_result(geometry2, geometry1, swap(exp_resulting_segment), strategy,