diff --git a/include/boost/geometry/algorithms/detail/is_simple/linear.hpp b/include/boost/geometry/algorithms/detail/is_simple/linear.hpp index 9bc0a1aaa9..33bb333861 100644 --- a/include/boost/geometry/algorithms/detail/is_simple/linear.hpp +++ b/include/boost/geometry/algorithms/detail/is_simple/linear.hpp @@ -68,12 +68,11 @@ template inline bool check_segment_indices(Turn const& turn, signed_size_type last_index) { - return - (turn.operations[0].seg_id.segment_index == 0 + return (turn.operations[0].seg_id.segment_index == 0 && turn.operations[1].seg_id.segment_index == last_index) || - (turn.operations[0].seg_id.segment_index == 0 - && turn.operations[1].seg_id.segment_index == last_index); + (turn.operations[1].seg_id.segment_index == 0 + && turn.operations[0].seg_id.segment_index == last_index); } diff --git a/include/boost/geometry/algorithms/detail/overlay/overlay.hpp b/include/boost/geometry/algorithms/detail/overlay/overlay.hpp index e0557b7c01..1d950306ac 100644 --- a/include/boost/geometry/algorithms/detail/overlay/overlay.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/overlay.hpp @@ -47,10 +47,6 @@ #include -#ifdef BOOST_GEOMETRY_DEBUG_ASSEMBLE -# include -#endif - namespace boost { namespace geometry { @@ -272,9 +268,6 @@ struct overlay turn_container_type turns; -#ifdef BOOST_GEOMETRY_DEBUG_ASSEMBLE -std::cout << "get turns" << std::endl; -#endif detail::get_turns::no_interrupt_policy policy; geometry::get_turns < @@ -302,11 +295,6 @@ std::cout << "get turns" << std::endl; } #endif - -#ifdef BOOST_GEOMETRY_DEBUG_ASSEMBLE -std::cout << "enrich" << std::endl; -#endif - cluster_type clusters; std::map turn_info_per_ring; @@ -317,9 +305,6 @@ std::cout << "enrich" << std::endl; visitor.visit_clusters(clusters, turns); -#ifdef BOOST_GEOMETRY_DEBUG_ASSEMBLE -std::cout << "traverse" << std::endl; -#endif // Traverse through intersection/turn points and create rings of them. // These rings are always in clockwise order. // In CCW polygons they are marked as "to be reversed" below. diff --git a/include/boost/geometry/formulas/karney_inverse.hpp b/include/boost/geometry/formulas/karney_inverse.hpp index cf338a5685..320984d360 100644 --- a/include/boost/geometry/formulas/karney_inverse.hpp +++ b/include/boost/geometry/formulas/karney_inverse.hpp @@ -371,7 +371,6 @@ class karney_inverse sin_sigma1, cos_sigma1, sin_sigma2, cos_sigma2, eps, diff_omega12, - iteration < max_iterations, dv, f, n, ep2, tiny, coeffs_C1); // Reversed test to allow escape with NaNs. @@ -392,7 +391,7 @@ class karney_inverse cos_alpha1a = cos_alpha1; } - if (iteration < max_iterations && dv > c0) + if (dv > c0) { CT diff_alpha1 = -v / dv; @@ -843,7 +842,7 @@ class karney_inverse CT& sin_sigma1, CT& cos_sigma1, CT& sin_sigma2, CT& cos_sigma2, CT& eps, CT& diff_omega12, - bool diffp, CT& diff_lam12, + CT& diff_lam12, CT const& f, CT const& n, CT const& ep2, CT const& tiny, CoeffsC1 const& coeffs_C1) { @@ -929,24 +928,22 @@ class karney_inverse diff_omega12 = -f * A3 * sin_alpha0 * (sigma12 + B312); lam12 = eta + diff_omega12; - if (diffp) + if (cos_alpha2 == c0) { - if (cos_alpha2 == c0) - { - diff_lam12 = - c2 * one_minus_f * dn1 / sin_beta1; - } - else - { - CT dummy; - meridian_length(eps, ep2, sigma12, sin_sigma1, cos_sigma1, dn1, - sin_sigma2, cos_sigma2, dn2, - cos_beta1, cos_beta2, dummy, - diff_lam12, dummy, dummy, - dummy, coeffs_C1); + diff_lam12 = - c2 * one_minus_f * dn1 / sin_beta1; + } + else + { + CT dummy; + meridian_length(eps, ep2, sigma12, sin_sigma1, cos_sigma1, dn1, + sin_sigma2, cos_sigma2, dn2, + cos_beta1, cos_beta2, dummy, + diff_lam12, dummy, dummy, + dummy, coeffs_C1); - diff_lam12 *= one_minus_f / (cos_alpha2 * cos_beta2); - } + diff_lam12 *= one_minus_f / (cos_alpha2 * cos_beta2); } + return lam12; } diff --git a/test/algorithms/set_operations/difference/difference_multi_areal_linear.cpp b/test/algorithms/set_operations/difference/difference_multi_areal_linear.cpp index aa29037289..2c9f561a0c 100644 --- a/test/algorithms/set_operations/difference/difference_multi_areal_linear.cpp +++ b/test/algorithms/set_operations/difference/difference_multi_areal_linear.cpp @@ -10,7 +10,6 @@ #include #include -//#define BOOST_GEOMETRY_DEBUG_ASSEMBLE //#define BOOST_GEOMETRY_CHECK_WITH_SQLSERVER //#define BOOST_GEOMETRY_DEBUG_SEGMENT_IDENTIFIER diff --git a/test/algorithms/set_operations/difference/test_difference.hpp b/test/algorithms/set_operations/difference/test_difference.hpp index 08906be13d..f9bbc569e6 100644 --- a/test/algorithms/set_operations/difference/test_difference.hpp +++ b/test/algorithms/set_operations/difference/test_difference.hpp @@ -227,8 +227,7 @@ std::string test_difference(std::string const& caseid, G1 const& g1, G2 const& g difference_output(caseid, g1, g2, result); -#if ! (defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE) \ - || defined(BOOST_GEOMETRY_DEBUG_ASSEMBLE)) +#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE) { // Test inserter functionality // Test if inserter returns output-iterator (using Boost.Range copy)