From 80191e68ac219d6823b02ddbf59ee2e8600b4284 Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Thu, 19 Jan 2012 16:17:50 +0000 Subject: [PATCH] [Geometry] Fixed unused parameters warnings in 15 files [SVN r76586] --- include/boost/geometry/algorithms/append.hpp | 2 +- include/boost/geometry/algorithms/buffer.hpp | 2 +- include/boost/geometry/algorithms/correct.hpp | 2 +- include/boost/geometry/algorithms/covered_by.hpp | 2 +- .../geometry/algorithms/detail/overlay/follow.hpp | 12 ++++++------ .../detail/overlay/intersection_insert.hpp | 10 +++++----- include/boost/geometry/algorithms/distance.hpp | 2 +- include/boost/geometry/algorithms/for_each.hpp | 4 +++- include/boost/geometry/algorithms/simplify.hpp | 4 ++-- .../boost/geometry/multi/algorithms/intersection.hpp | 2 +- .../strategies/agnostic/simplify_douglas_peucker.hpp | 3 +-- .../strategies/cartesian/distance_pythagoras.hpp | 4 ++-- .../boost/geometry/strategies/strategy_transform.hpp | 2 +- .../strategies/transform/matrix_transformers.hpp | 4 ++-- include/boost/geometry/util/for_each_coordinate.hpp | 2 +- 15 files changed, 29 insertions(+), 28 deletions(-) diff --git a/include/boost/geometry/algorithms/append.hpp b/include/boost/geometry/algorithms/append.hpp index 2ceae718d..72b2bbada 100644 --- a/include/boost/geometry/algorithms/append.hpp +++ b/include/boost/geometry/algorithms/append.hpp @@ -38,7 +38,7 @@ namespace detail { namespace append template struct append_no_action { - static inline void apply(Geometry& geometry, Point const& point, + static inline void apply(Geometry& , Point const& , int = 0, int = 0) { } diff --git a/include/boost/geometry/algorithms/buffer.hpp b/include/boost/geometry/algorithms/buffer.hpp index 7133acc73..e22e36add 100644 --- a/include/boost/geometry/algorithms/buffer.hpp +++ b/include/boost/geometry/algorithms/buffer.hpp @@ -83,7 +83,7 @@ template struct buffer { static inline void apply(BoxIn const& box_in, T const& distance, - T const& chord_length, BoxIn& box_out) + T const& , BoxIn& box_out) { detail::buffer::buffer_box(box_in, distance, box_out); } diff --git a/include/boost/geometry/algorithms/correct.hpp b/include/boost/geometry/algorithms/correct.hpp index 9d2083238..069e1387f 100644 --- a/include/boost/geometry/algorithms/correct.hpp +++ b/include/boost/geometry/algorithms/correct.hpp @@ -80,7 +80,7 @@ struct correct_box_loop template struct correct_box_loop { - static inline void apply(Box& box) + static inline void apply(Box& ) {} }; diff --git a/include/boost/geometry/algorithms/covered_by.hpp b/include/boost/geometry/algorithms/covered_by.hpp index 6769bcd73..ec791da63 100644 --- a/include/boost/geometry/algorithms/covered_by.hpp +++ b/include/boost/geometry/algorithms/covered_by.hpp @@ -73,7 +73,7 @@ struct covered_by template struct covered_by { - static inline bool apply(Point const& point, Ring const& ring, Strategy const& strategy) + static inline bool apply(Point const& point, Ring const& ring, Strategy const& ) { return detail::within::point_in_ring < diff --git a/include/boost/geometry/algorithms/detail/overlay/follow.hpp b/include/boost/geometry/algorithms/detail/overlay/follow.hpp index 925c3edfa..274cc47b8 100644 --- a/include/boost/geometry/algorithms/detail/overlay/follow.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/follow.hpp @@ -33,7 +33,7 @@ namespace following { template -static inline bool is_entering(Turn const& turn, Operation const& op) +static inline bool is_entering(Turn const& /* TODO remove this parameter */, Operation const& op) { // (Blocked means: blocked for polygon/polygon intersection, because // they are reversed. But for polygon/line it is similar to continue) @@ -126,10 +126,10 @@ struct action_selector typename Operation > static inline void enter(LineStringOut& current_piece, - LineString const& linestring, + LineString const& , segment_identifier& segment_id, - int index, Point const& point, - Operation const& operation, OutputIterator& out) + int , Point const& point, + Operation const& operation, OutputIterator& ) { // On enter, append the intersection point and remember starting point detail::overlay::append_no_duplicates(current_piece, point); @@ -148,7 +148,7 @@ struct action_selector LineString const& linestring, segment_identifier& segment_id, int index, Point const& point, - Operation const& operation, OutputIterator& out) + Operation const& , OutputIterator& out) { // On leave, copy all segments from starting point, append the intersection point // and add the output piece @@ -273,7 +273,7 @@ public : template static inline OutputIterator apply(LineString const& linestring, Polygon const& polygon, - detail::overlay::operation_type operation, + detail::overlay::operation_type , // TODO: this parameter might be redundant Turns& turns, OutputIterator out) { typedef typename boost::range_iterator::type turn_iterator; diff --git a/include/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp b/include/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp index bb05eb155..45324fc79 100644 --- a/include/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp @@ -50,7 +50,7 @@ struct intersection_segment_segment_point { static inline OutputIterator apply(Segment1 const& segment1, Segment2 const& segment2, OutputIterator out, - Strategy const& strategy) + Strategy const& ) { typedef typename point_type::type point_type; @@ -146,7 +146,7 @@ struct intersection_of_linestring_with_areal static inline OutputIterator apply(LineString const& linestring, Areal const& areal, OutputIterator out, - Strategy const& strategy) + Strategy const& ) { if (boost::size(linestring) == 0) { @@ -351,7 +351,7 @@ struct intersection_insert > { static inline OutputIterator apply(Linestring const& linestring, - Box const& box, OutputIterator out, Strategy const& strategy) + Box const& box, OutputIterator out, Strategy const& ) { typedef typename point_type::type point_type; strategy::intersection::liang_barsky lb_strategy; @@ -436,7 +436,7 @@ struct intersection_insert > { static inline OutputIterator apply(Segment const& segment, - Box const& box, OutputIterator out, Strategy const& strategy) + Box const& box, OutputIterator out, Strategy const& ) { geometry::segment_view range(segment); @@ -469,7 +469,7 @@ struct intersection_insert > { static inline OutputIterator apply(Geometry1 const& geometry1, - Geometry2 const& geometry2, OutputIterator out, Strategy const& strategy) + Geometry2 const& geometry2, OutputIterator out, Strategy const& ) { typedef detail::overlay::turn_info turn_info; diff --git a/include/boost/geometry/algorithms/distance.hpp b/include/boost/geometry/algorithms/distance.hpp index 9b4a6476b..eca3b03c7 100644 --- a/include/boost/geometry/algorithms/distance.hpp +++ b/include/boost/geometry/algorithms/distance.hpp @@ -64,7 +64,7 @@ template struct point_to_segment { static inline typename return_type::type apply(Point const& point, - Segment const& segment, Strategy const& strategy) + Segment const& segment, Strategy const& ) { typename strategy::distance::services::default_strategy < diff --git a/include/boost/geometry/algorithms/for_each.hpp b/include/boost/geometry/algorithms/for_each.hpp index 10e1ee7e1..c1e65459e 100644 --- a/include/boost/geometry/algorithms/for_each.hpp +++ b/include/boost/geometry/algorithms/for_each.hpp @@ -55,8 +55,10 @@ template struct fe_point_per_segment { static inline Functor apply( - typename add_const_if_c::type& point, Functor f) + typename add_const_if_c::type& , Functor f) { + // TODO: if non-const, we should extract the points from the segment + // and call the functor on those two points return f; } }; diff --git a/include/boost/geometry/algorithms/simplify.hpp b/include/boost/geometry/algorithms/simplify.hpp index ff93e714f..225321d30 100644 --- a/include/boost/geometry/algorithms/simplify.hpp +++ b/include/boost/geometry/algorithms/simplify.hpp @@ -67,7 +67,7 @@ struct simplify_copy { template static inline void apply(Range const& range, Range& out, - Distance const& max_distance, Strategy const& strategy) + Distance const& , Strategy const& ) { std::copy ( @@ -179,7 +179,7 @@ struct simplify { template static inline void apply(Point const& point, Point& out, - Distance const& max_distance, Strategy const& strategy) + Distance const& , Strategy const& ) { geometry::convert(point, out); } diff --git a/include/boost/geometry/multi/algorithms/intersection.hpp b/include/boost/geometry/multi/algorithms/intersection.hpp index c918fcde0..e50292e60 100644 --- a/include/boost/geometry/multi/algorithms/intersection.hpp +++ b/include/boost/geometry/multi/algorithms/intersection.hpp @@ -181,7 +181,7 @@ template struct clip_multi_linestring { static inline OutputIterator apply(MultiLinestring const& multi_linestring, - Box const& box, OutputIterator out, Strategy const& strategy) + Box const& box, OutputIterator out, Strategy const& ) { typedef typename point_type::type point_type; strategy::intersection::liang_barsky lb_strategy; diff --git a/include/boost/geometry/strategies/agnostic/simplify_douglas_peucker.hpp b/include/boost/geometry/strategies/agnostic/simplify_douglas_peucker.hpp index 76a00d6f9..4a1a22d1c 100644 --- a/include/boost/geometry/strategies/agnostic/simplify_douglas_peucker.hpp +++ b/include/boost/geometry/strategies/agnostic/simplify_douglas_peucker.hpp @@ -60,8 +60,7 @@ namespace detail {} // Necessary for proper compilation - inline douglas_peucker_point operator=( - douglas_peucker_point const& other) + inline douglas_peucker_point operator=(douglas_peucker_point const& ) { return douglas_peucker_point(*this); } diff --git a/include/boost/geometry/strategies/cartesian/distance_pythagoras.hpp b/include/boost/geometry/strategies/cartesian/distance_pythagoras.hpp index b8d5c453e..8737ca11f 100644 --- a/include/boost/geometry/strategies/cartesian/distance_pythagoras.hpp +++ b/include/boost/geometry/strategies/cartesian/distance_pythagoras.hpp @@ -219,7 +219,7 @@ struct get_comparable > { typedef comparable::pythagoras comparable_type; public : - static inline comparable_type apply(pythagoras const& input) + static inline comparable_type apply(pythagoras const& ) { return comparable_type(); } @@ -303,7 +303,7 @@ struct get_comparable > { typedef comparable::pythagoras comparable_type; public : - static inline comparable_type apply(comparable::pythagoras const& input) + static inline comparable_type apply(comparable::pythagoras const& ) { return comparable_type(); } diff --git a/include/boost/geometry/strategies/strategy_transform.hpp b/include/boost/geometry/strategies/strategy_transform.hpp index 550b41f36..7a1f06016 100644 --- a/include/boost/geometry/strategies/strategy_transform.hpp +++ b/include/boost/geometry/strategies/strategy_transform.hpp @@ -66,7 +66,7 @@ template struct transform_coordinates { template - static inline void transform(Src const& source, Dst& dest, T value) + static inline void transform(Src const& , Dst& , T ) { } }; diff --git a/include/boost/geometry/strategies/transform/matrix_transformers.hpp b/include/boost/geometry/strategies/transform/matrix_transformers.hpp index 32e3d07e4..68da24093 100644 --- a/include/boost/geometry/strategies/transform/matrix_transformers.hpp +++ b/include/boost/geometry/strategies/transform/matrix_transformers.hpp @@ -218,7 +218,7 @@ public : // constructor takes an optional third argument doing nothing. inline translate_transformer(coordinate_type const& translate_x, coordinate_type const& translate_y, - coordinate_type const& dummy = 0) + coordinate_type const& = 0) : ublas_transformer( 1, 0, translate_x, 0, 1, translate_y, @@ -275,7 +275,7 @@ class scale_transformer : public ublas_transformer public : inline scale_transformer(coordinate_type const& scale_x, coordinate_type const& scale_y, - coordinate_type const& dummy = 0) + coordinate_type const& = 0) : ublas_transformer( scale_x, 0, 0, 0, scale_y, 0, diff --git a/include/boost/geometry/util/for_each_coordinate.hpp b/include/boost/geometry/util/for_each_coordinate.hpp index 2726d50cd..7a1f55b00 100644 --- a/include/boost/geometry/util/for_each_coordinate.hpp +++ b/include/boost/geometry/util/for_each_coordinate.hpp @@ -54,7 +54,7 @@ struct coordinates_scanner < IsConst, Point - >::type& point, Op operation) + >::type& , Op operation) { return operation; }