diff options
Diffstat (limited to 'boost/geometry/algorithms/detail/buffer/turn_in_original_visitor.hpp')
-rw-r--r-- | boost/geometry/algorithms/detail/buffer/turn_in_original_visitor.hpp | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/boost/geometry/algorithms/detail/buffer/turn_in_original_visitor.hpp b/boost/geometry/algorithms/detail/buffer/turn_in_original_visitor.hpp index b1930dc0c4..daa59b618b 100644 --- a/boost/geometry/algorithms/detail/buffer/turn_in_original_visitor.hpp +++ b/boost/geometry/algorithms/detail/buffer/turn_in_original_visitor.hpp @@ -2,8 +2,9 @@ // Copyright (c) 2014 Barend Gehrels, Amsterdam, the Netherlands. -// This file was modified by Oracle on 2016-2020. -// Modifications copyright (c) 2016-2020 Oracle and/or its affiliates. +// This file was modified by Oracle on 2016-2023. +// Modifications copyright (c) 2016-2023 Oracle and/or its affiliates. +// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Use, modification and distribution is subject to the Boost Software License, @@ -18,6 +19,7 @@ #include <boost/geometry/core/coordinate_type.hpp> #include <boost/geometry/algorithms/detail/buffer/buffer_policies.hpp> +#include <boost/geometry/algorithms/detail/disjoint/interface.hpp> #include <boost/geometry/algorithms/expand.hpp> #include <boost/geometry/strategies/agnostic/point_in_poly_winding.hpp> #include <boost/geometry/strategies/buffer.hpp> @@ -32,7 +34,7 @@ namespace detail { namespace buffer { -template <typename Strategy> +template <typename Strategy> struct original_get_box { explicit original_get_box(Strategy const& strategy) @@ -190,20 +192,11 @@ inline int point_in_original(Point const& point, Original const& original, return strategy.result(state); } - typedef typename Original::sections_type sections_type; - typedef typename boost::range_iterator<sections_type const>::type iterator_type; - typedef typename boost::range_value<sections_type const>::type section_type; - typedef typename geometry::coordinate_type<Point>::type coordinate_type; - - coordinate_type const point_x = geometry::get<0>(point); + auto const point_x = geometry::get<0>(point); // Walk through all monotonic sections of this original - for (iterator_type it = boost::begin(original.m_sections); - it != boost::end(original.m_sections); - ++it) + for (auto const& section : original.m_sections) { - section_type const& section = *it; - if (! section.duplicate && section.begin_index < section.end_index && point_x >= geometry::get<min_corner, 0>(section.bounding_box) |