Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76585 - in trunk/boost/geometry: algorithms algorithms/detail/overlay algorithms/detail/sections policies/relate
From: barend.gehrels_at_[hidden]
Date: 2012-01-19 04:56:49


Author: barendgehrels
Date: 2012-01-19 04:56:47 EST (Thu, 19 Jan 2012)
New Revision: 76585
URL: http://svn.boost.org/trac/boost/changeset/76585

Log:
Applied (modified) patch of Christophe to avoid gcc warnings on unused parameters
Text files modified:
   trunk/boost/geometry/algorithms/centroid.hpp | 6 +++---
   trunk/boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp | 6 +++---
   trunk/boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp | 2 +-
   trunk/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp | 12 ++++++------
   trunk/boost/geometry/algorithms/detail/overlay/handle_tangencies.hpp | 24 +++++++++++++++---------
   trunk/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp | 2 +-
   trunk/boost/geometry/algorithms/detail/overlay/select_rings.hpp | 8 ++++----
   trunk/boost/geometry/algorithms/detail/overlay/traverse.hpp | 8 ++++++--
   trunk/boost/geometry/algorithms/detail/sections/range_by_section.hpp | 2 +-
   trunk/boost/geometry/policies/relate/direction.hpp | 2 +-
   trunk/boost/geometry/policies/relate/intersection_points.hpp | 6 +++---
   11 files changed, 44 insertions(+), 34 deletions(-)

Modified: trunk/boost/geometry/algorithms/centroid.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/centroid.hpp (original)
+++ trunk/boost/geometry/algorithms/centroid.hpp 2012-01-19 04:56:47 EST (Thu, 19 Jan 2012)
@@ -191,7 +191,7 @@
             it != end;
             ++previous, ++it)
         {
- Strategy::apply(*previous, *it, state);
+ strategy.apply(*previous, *it, state);
         }
     }
 };
@@ -211,7 +211,7 @@
                     Closure,
                     Strategy
>::apply(range, strategy, state);
- Strategy::result(state, centroid);
+ strategy.result(state, centroid);
         }
     }
 };
@@ -262,7 +262,7 @@
                     Polygon,
                     Strategy
>::apply(poly, strategy, state);
- Strategy::result(state, centroid);
+ strategy.result(state, centroid);
         }
     }
 };

Modified: trunk/boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp (original)
+++ trunk/boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp 2012-01-19 04:56:47 EST (Thu, 19 Jan 2012)
@@ -294,9 +294,9 @@
>
 inline void enrich_assign(Container& operations,
             TurnPoints& turn_points,
- operation_type for_operation,
- Geometry1 const& geometry1, Geometry2 const& geometry2,
- Strategy const& strategy)
+ operation_type ,
+ Geometry1 const& , Geometry2 const& ,
+ Strategy const& )
 {
     typedef typename IndexType::type operations_type;
     typedef typename boost::range_iterator<Container const>::type iterator_type;

Modified: trunk/boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp (original)
+++ trunk/boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp 2012-01-19 04:56:47 EST (Thu, 19 Jan 2012)
@@ -51,7 +51,7 @@
     static inline OutputIterator apply(
                 Point1 const& pi, Point1 const& pj, Point1 const& pk,
                 Point2 const& qi, Point2 const& qj, Point2 const& qk,
- TurnInfo const& tp_model,
+ TurnInfo const& ,
                 OutputIterator out)
     {
         typedef model::referring_segment<Point1 const> segment_type1;

Modified: trunk/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp (original)
+++ trunk/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp 2012-01-19 04:56:47 EST (Thu, 19 Jan 2012)
@@ -89,7 +89,7 @@
         typename DirInfo
>
     static inline void apply(
- Point1 const& pi, Point1 const& pj, Point1 const& pk,
+ Point1 const& pi, Point1 const& pj, Point1 const& ,
                 Point2 const& qi, Point2 const& qj, Point2 const& qk,
                 TurnInfo& ti,
                 IntersectionInfo const& intersection_info,
@@ -399,10 +399,10 @@
>
     static inline void apply(
                 Point1 const& pi, Point1 const& pj, Point1 const& pk,
- Point2 const& qi, Point2 const& qj, Point2 const& qk,
+ Point2 const& , Point2 const& qj, Point2 const& qk,
                 TurnInfo& ti,
                 IntersectionInfo const& intersection_info,
- DirInfo const& dir_info)
+ DirInfo const& )
     {
         ti.method = method_equal;
         // Copy the SECOND intersection point
@@ -656,8 +656,8 @@
         typename DirInfo
>
     static inline void apply(
- Point1 const& pi, Point1 const& pj, Point1 const& pk,
- Point2 const& qi, Point2 const& qj, Point2 const& qk,
+ Point1 const& , Point1 const& , Point1 const& ,
+ Point2 const& , Point2 const& , Point2 const& ,
                 TurnInfo& ti,
                 IntersectionInfo const& intersection_info,
                 DirInfo const& dir_info)
@@ -687,7 +687,7 @@
 struct assign_null_policy
 {
     template <typename Point1, typename Point2, typename Info>
- static inline void apply(Info& info, Point1 const& p1, Point2 const& p2)
+ static inline void apply(Info& , Point1 const& , Point2 const& )
     {}
 
 };

Modified: trunk/boost/geometry/algorithms/detail/overlay/handle_tangencies.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/detail/overlay/handle_tangencies.hpp (original)
+++ trunk/boost/geometry/algorithms/detail/overlay/handle_tangencies.hpp 2012-01-19 04:56:47 EST (Thu, 19 Jan 2012)
@@ -93,6 +93,7 @@
     }
 
 
+#ifdef BOOST_GEOMETRY_DEBUG_ENRICH
     inline void debug_consider(int order, Indexed const& left,
             Indexed const& right, std::string const& header,
             bool skip = true,
@@ -101,8 +102,6 @@
     {
         if (skip) return;
 
-
-#ifdef BOOST_GEOMETRY_DEBUG_ENRICH
         point_type pi, pj, ri, rj, si, sj;
         geometry::copy_segment_points<Reverse1, Reverse2>(m_geometry1, m_geometry2,
             left.subject.seg_id,
@@ -151,14 +150,21 @@
             std::cout << " " << extra << " " << (ret ? "true" : "false");
         }
         std::cout << std::endl;
-#endif
     }
+#else
+ inline void debug_consider(int, Indexed const& ,
+ Indexed const& , std::string const& ,
+ bool = true,
+ std::string const& = "", bool = false
+ ) const
+ {}
+#endif
 
 
     // ux/ux
     inline bool consider_ux_ux(Indexed const& left,
             Indexed const& right
- , std::string const& header
+ , std::string const& // header
         ) const
     {
         bool ret = left.index < right.index;
@@ -190,7 +196,7 @@
     inline bool consider_iu_ux(Indexed const& left,
             Indexed const& right,
             int order // 1: iu first, -1: ux first
- , std::string const& header
+ , std::string const& // header
         ) const
     {
         bool ret = false;
@@ -234,7 +240,7 @@
     inline bool consider_iu_ix(Indexed const& left,
             Indexed const& right,
             int order // 1: iu first, -1: ix first
- , std::string const& header
+ , std::string const& // header
         ) const
     {
         //debug_consider(order, left, right, header, false, "iu/ix");
@@ -507,9 +513,9 @@
>
 inline void inspect_cluster(Iterator begin_cluster, Iterator end_cluster,
             TurnPoints& turn_points,
- operation_type for_operation,
- Geometry1 const& geometry1, Geometry2 const& geometry2,
- Strategy const& strategy)
+ operation_type ,
+ Geometry1 const& , Geometry2 const& ,
+ Strategy const& )
 {
     int count = 0;
 

Modified: trunk/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp (original)
+++ trunk/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp 2012-01-19 04:56:47 EST (Thu, 19 Jan 2012)
@@ -86,7 +86,7 @@
 {
     static inline OutputIterator apply(Linestring1 const& linestring1,
             Linestring2 const& linestring2, OutputIterator out,
- Strategy const& strategy)
+ Strategy const& )
     {
         typedef typename point_type<PointOut>::type point_type;
 

Modified: trunk/boost/geometry/algorithms/detail/overlay/select_rings.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/detail/overlay/select_rings.hpp (original)
+++ trunk/boost/geometry/algorithms/detail/overlay/select_rings.hpp 2012-01-19 04:56:47 EST (Thu, 19 Jan 2012)
@@ -40,7 +40,7 @@
     struct select_rings<box_tag, Box>
     {
         template <typename Geometry, typename Map>
- static inline void apply(Box const& box, Geometry const& geometry,
+ static inline void apply(Box const& box, Geometry const& ,
                 ring_identifier const& id, Map& map, bool midpoint)
         {
             map[id] = typename Map::mapped_type(box, midpoint);
@@ -58,7 +58,7 @@
     struct select_rings<ring_tag, Ring>
     {
         template <typename Geometry, typename Map>
- static inline void apply(Ring const& ring, Geometry const& geometry,
+ static inline void apply(Ring const& ring, Geometry const& ,
                     ring_identifier const& id, Map& map, bool midpoint)
         {
             if (boost::size(ring) > 0)
@@ -129,7 +129,7 @@
 struct decide<overlay_union>
 {
     template <typename Code>
- static bool include(ring_identifier const& id, Code const& code)
+ static bool include(ring_identifier const& , Code const& code)
     {
         return code.within_code * -1 == 1;
     }
@@ -162,7 +162,7 @@
 struct decide<overlay_intersection>
 {
     template <typename Code>
- static bool include(ring_identifier const& id, Code const& code)
+ static bool include(ring_identifier const& , Code const& code)
     {
         return code.within_code * 1 == 1;
     }

Modified: trunk/boost/geometry/algorithms/detail/overlay/traverse.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/detail/overlay/traverse.hpp (original)
+++ trunk/boost/geometry/algorithms/detail/overlay/traverse.hpp 2012-01-19 04:56:47 EST (Thu, 19 Jan 2012)
@@ -37,10 +37,10 @@
 {
 
 template <typename Turn, typename Operation>
+#ifdef BOOST_GEOMETRY_DEBUG_TRAVERSE
 inline void debug_traverse(Turn const& turn, Operation op,
                 std::string const& header)
 {
-#ifdef BOOST_GEOMETRY_DEBUG_TRAVERSE
     std::cout << header
         << " at " << op.seg_id
         << " meth: " << method_char(turn.method)
@@ -55,8 +55,12 @@
     {
         std::cout << std::endl;
     }
-#endif
 }
+#else
+inline void debug_traverse(Turn const& , Operation, std::string const& )
+{
+}
+#endif
 
 
 template <typename Info, typename Turn>

Modified: trunk/boost/geometry/algorithms/detail/sections/range_by_section.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/detail/sections/range_by_section.hpp (original)
+++ trunk/boost/geometry/algorithms/detail/sections/range_by_section.hpp 2012-01-19 04:56:47 EST (Thu, 19 Jan 2012)
@@ -36,7 +36,7 @@
 template <typename Range, typename Section>
 struct full_section_range
 {
- static inline Range const& apply(Range const& range, Section const& section)
+ static inline Range const& apply(Range const& range, Section const& )
     {
         return range;
     }

Modified: trunk/boost/geometry/policies/relate/direction.hpp
==============================================================================
--- trunk/boost/geometry/policies/relate/direction.hpp (original)
+++ trunk/boost/geometry/policies/relate/direction.hpp 2012-01-19 04:56:47 EST (Thu, 19 Jan 2012)
@@ -241,7 +241,7 @@
         return return_type('p', false);
     }
 
- static inline return_type error(std::string const& msg)
+ static inline return_type error(std::string const&)
     {
         // msg
         return return_type('d', false);

Modified: trunk/boost/geometry/policies/relate/intersection_points.hpp
==============================================================================
--- trunk/boost/geometry/policies/relate/intersection_points.hpp (original)
+++ trunk/boost/geometry/policies/relate/intersection_points.hpp 2012-01-19 04:56:47 EST (Thu, 19 Jan 2012)
@@ -120,7 +120,7 @@
         return collinear_inside(s, index1, 1 - index1);
     }
 
- static inline return_type collinear_a_in_b(S1 const& s, bool opposite)
+ static inline return_type collinear_a_in_b(S1 const& s, bool)
     {
         return collinear_inside(s);
     }
@@ -144,7 +144,7 @@
         return result;
     }
 
- static inline return_type segment_equal(S1 const& s, bool opposite)
+ static inline return_type segment_equal(S1 const& s, bool)
     {
         return_type result;
         result.count = 2;
@@ -160,7 +160,7 @@
     {
         return return_type();
     }
- static inline return_type error(std::string const& msg)
+ static inline return_type error(std::string const&)
     {
         return return_type();
     }


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