|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r60553 - sandbox/geometry/boost/geometry/multi/algorithms
From: barend.gehrels_at_[hidden]
Date: 2010-03-13 07:57:17
Author: barendgehrels
Date: 2010-03-13 07:57:16 EST (Sat, 13 Mar 2010)
New Revision: 60553
URL: http://svn.boost.org/trac/boost/changeset/60553
Log:
Multi uses same structure as reverse now, detail/modify
Text files modified:
sandbox/geometry/boost/geometry/multi/algorithms/correct.hpp | 33 ++++++++++-----------------------
sandbox/geometry/boost/geometry/multi/algorithms/reverse.hpp | 2 +-
2 files changed, 11 insertions(+), 24 deletions(-)
Modified: sandbox/geometry/boost/geometry/multi/algorithms/correct.hpp
==============================================================================
--- sandbox/geometry/boost/geometry/multi/algorithms/correct.hpp (original)
+++ sandbox/geometry/boost/geometry/multi/algorithms/correct.hpp 2010-03-13 07:57:16 EST (Sat, 13 Mar 2010)
@@ -9,11 +9,11 @@
#ifndef BOOST_GEOMETRY_MULTI_ALGORITHMS_CORRECT_HPP
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_CORRECT_HPP
-#include <boost/range/functions.hpp>
-#include <boost/range/metafunctions.hpp>
+#include <boost/range/metafunctions.hpp>
#include <boost/geometry/algorithms/correct.hpp>
+#include <boost/geometry/multi/algorithms/detail/modify.hpp>
#include <boost/geometry/multi/core/tags.hpp>
@@ -22,27 +22,7 @@
namespace boost { namespace geometry
{
-#ifndef DOXYGEN_NO_DETAIL
-namespace detail { namespace correct {
-
-template <typename MultiPolygon>
-struct correct_multi_polygon
-{
- static inline void apply(MultiPolygon& mp)
- {
- typedef typename boost::range_value<MultiPolygon>::type polygon_type;
- for (typename boost::range_iterator<MultiPolygon>::type it
- = boost::begin(mp);
- it != boost::end(mp);
- ++it)
- {
- correct_polygon<polygon_type>::apply(*it);
- }
- }
-};
-}} // namespace detail::correct
-#endif
#ifndef DOXYGEN_NO_DISPATCH
namespace dispatch
@@ -50,7 +30,14 @@
template <typename Geometry>
struct correct<multi_polygon_tag, Geometry>
- : detail::correct::correct_multi_polygon<Geometry>
+ : detail::multi_modify
+ <
+ Geometry,
+ detail::correct::correct_polygon
+ <
+ typename boost::range_value<Geometry>::type
+ >
+ >
{};
Modified: sandbox/geometry/boost/geometry/multi/algorithms/reverse.hpp
==============================================================================
--- sandbox/geometry/boost/geometry/multi/algorithms/reverse.hpp (original)
+++ sandbox/geometry/boost/geometry/multi/algorithms/reverse.hpp 2010-03-13 07:57:16 EST (Sat, 13 Mar 2010)
@@ -8,7 +8,7 @@
#ifndef BOOST_GEOMETRY_MULTI_ALGORITHMS_REVERSE_HPP
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_REVERSE_HPP
-#include <boost/range/functions.hpp>
+
#include <boost/range/metafunctions.hpp>
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk