From 2fc1ca4e9c0b4827cff565342c5b9c50529a6cfc Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Mon, 31 Mar 2014 09:41:17 +0200 Subject: [PATCH] [relate] Fix for_each_disjoint_geometry_if return value for Multi Geometries Fix GCC warnings. --- .../algorithms/detail/overlay/get_turn_info_for_endpoint.hpp | 5 ++++- .../geometry/algorithms/detail/overlay/get_turn_info_la.hpp | 4 ++-- .../geometry/algorithms/detail/relate/follow_helpers.hpp | 5 +---- .../geometry/algorithms/detail/relate/linear_linear.hpp | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/boost/geometry/algorithms/detail/overlay/get_turn_info_for_endpoint.hpp b/include/boost/geometry/algorithms/detail/overlay/get_turn_info_for_endpoint.hpp index d960dd0aa..3ecb80f69 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_turn_info_for_endpoint.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_turn_info_for_endpoint.hpp @@ -134,7 +134,7 @@ struct get_turn_info_for_endpoint bool is_q_first, bool is_q_last, TurnInfo const& tp_model, IntersectionResult const& result, - method_type method, + method_type /*method*/, OutputIterator out) { std::size_t ip_count = result.template get<0>().count; @@ -389,6 +389,9 @@ struct get_turn_info_for_endpoint IntersectionResult const& result, operation_type & op1, operation_type & op2) { + boost::ignore_unused_variable_warning(ip); + boost::ignore_unused_variable_warning(tp_model); + if ( !first2 && !last2 ) { if ( first1 ) diff --git a/include/boost/geometry/algorithms/detail/overlay/get_turn_info_la.hpp b/include/boost/geometry/algorithms/detail/overlay/get_turn_info_la.hpp index 73b811aea..8034c5db8 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_turn_info_la.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_turn_info_la.hpp @@ -364,7 +364,7 @@ struct get_turn_info_linear_areal method_type m_method; }; - static inline void replace_operations_i(operation_type & op0, operation_type & op1) + static inline void replace_operations_i(operation_type & /*op0*/, operation_type & op1) { // assuming Linear is always the first one op1 = operation_union; @@ -385,7 +385,7 @@ struct get_turn_info_linear_areal bool is_q_first, bool is_q_last, TurnInfo const& tp_model, IntersectionResult const& result, - method_type method, + method_type /*method*/, OutputIterator out) { namespace ov = overlay; diff --git a/include/boost/geometry/algorithms/detail/relate/follow_helpers.hpp b/include/boost/geometry/algorithms/detail/relate/follow_helpers.hpp index 10977f8b4..eed9a8228 100644 --- a/include/boost/geometry/algorithms/detail/relate/follow_helpers.hpp +++ b/include/boost/geometry/algorithms/detail/relate/follow_helpers.hpp @@ -70,20 +70,17 @@ struct for_each_disjoint_geometry_if { typedef typename boost::range_iterator::type iterator; - bool found = false; - // O(N) // check predicate for each contained geometry without generated turn for ( iterator it = boost::begin(geometry) ; it != boost::end(geometry) ; ++it ) { - found = true; bool cont = pred(*it); if ( !cont ) break; } - return true; + return !boost::empty(geometry); } template diff --git a/include/boost/geometry/algorithms/detail/relate/linear_linear.hpp b/include/boost/geometry/algorithms/detail/relate/linear_linear.hpp index ddc7332e2..ba9e0f137 100644 --- a/include/boost/geometry/algorithms/detail/relate/linear_linear.hpp +++ b/include/boost/geometry/algorithms/detail/relate/linear_linear.hpp @@ -335,7 +335,7 @@ struct linear_linear void apply(Result & res, TurnIt first, TurnIt it, TurnIt last, Geometry const& geometry, - OtherGeometry const& other_geometry, + OtherGeometry const& /*other_geometry*/, BoundaryChecker const& boundary_checker, OtherBoundaryChecker const& other_boundary_checker) {