From 71d216b90256936a9638f325af9bc69d720e75de Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Thu, 6 Oct 2016 10:30:07 +0900 Subject: Imported Upstream version 1.59.0 Change-Id: I2dde00f4eca71df3eea9d251dcaecde18a6c90a5 Signed-off-by: DongHun Kwak --- .../algorithms/detail/buffer/buffer_policies.hpp | 35 ++++++++++++++-------- 1 file changed, 23 insertions(+), 12 deletions(-) (limited to 'boost/geometry/algorithms/detail/buffer/buffer_policies.hpp') diff --git a/boost/geometry/algorithms/detail/buffer/buffer_policies.hpp b/boost/geometry/algorithms/detail/buffer/buffer_policies.hpp index c5bb8acc05..255ac797dc 100644 --- a/boost/geometry/algorithms/detail/buffer/buffer_policies.hpp +++ b/boost/geometry/algorithms/detail/buffer/buffer_policies.hpp @@ -9,6 +9,9 @@ #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_BUFFER_BUFFER_POLICIES_HPP #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_BUFFER_BUFFER_POLICIES_HPP +#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS) +# define BOOST_GEOMETRY_BUFFER_USE_SIDE_OF_INTERSECTION +#endif #include @@ -81,8 +84,8 @@ template struct buffer_turn_operation : public detail::overlay::traversal_turn_operation { - int piece_index; - int index_in_robust_ring; + signed_size_type piece_index; + signed_size_type index_in_robust_ring; inline buffer_turn_operation() : piece_index(-1) @@ -103,7 +106,7 @@ struct buffer_turn_info typedef Point point_type; typedef RobustPoint robust_point_type; - int turn_index; // TODO: this might go if partition can operate on non-const input + std::size_t turn_index; // TODO: this might go if partition can operate on non-const input RobustPoint robust_point; #if defined(BOOST_GEOMETRY_BUFFER_ENLARGED_CLUSTERS) @@ -122,24 +125,30 @@ struct buffer_turn_info intersection_location_type location; - int count_within; +#if defined(BOOST_GEOMETRY_BUFFER_USE_SIDE_OF_INTERSECTION) + robust_point_type rob_pi, rob_pj, rob_qi, rob_qj; +#endif + + std::size_t count_within; bool within_original; - int count_on_original_boundary; - int count_in_original; // increased by +1 for in ext.ring, -1 for int.ring + std::size_t count_on_original_boundary; + signed_size_type count_in_original; // increased by +1 for in ext.ring, -1 for int.ring - int count_on_offsetted; - int count_on_helper; - int count_within_near_offsetted; + std::size_t count_on_offsetted; + std::size_t count_on_helper; +#if ! defined(BOOST_GEOMETRY_BUFFER_USE_SIDE_OF_INTERSECTION) + std::size_t count_within_near_offsetted; +#endif bool remove_on_multi; // Obsolete: - int count_on_occupied; - int count_on_multi; + std::size_t count_on_occupied; + std::size_t count_on_multi; inline buffer_turn_info() - : turn_index(-1) + : turn_index(0) , location(location_ok) , count_within(0) , within_original(false) @@ -147,7 +156,9 @@ struct buffer_turn_info , count_in_original(0) , count_on_offsetted(0) , count_on_helper(0) +#if ! defined(BOOST_GEOMETRY_BUFFER_USE_SIDE_OF_INTERSECTION) , count_within_near_offsetted(0) +#endif , remove_on_multi(false) , count_on_occupied(0) , count_on_multi(0) -- cgit v1.2.3