Applied (modified) patch of Christophe to avoid gcc warnings on unused parameters

[SVN r76585]
This commit is contained in:
Barend Gehrels
2012-01-19 09:56:47 +00:00
parent df8bf1fd78
commit a41aea7187
11 changed files with 44 additions and 34 deletions

View File

@@ -191,7 +191,7 @@ struct centroid_range_state
it != end;
++previous, ++it)
{
Strategy::apply(*previous, *it, state);
strategy.apply(*previous, *it, state);
}
}
};
@@ -211,7 +211,7 @@ struct centroid_range
Closure,
Strategy
>::apply(range, strategy, state);
Strategy::result(state, centroid);
strategy.result(state, centroid);
}
}
};
@@ -262,7 +262,7 @@ struct centroid_polygon
Polygon,
Strategy
>::apply(poly, strategy, state);
Strategy::result(state, centroid);
strategy.result(state, centroid);
}
}
};

View File

@@ -294,9 +294,9 @@ template
>
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;

View File

@@ -51,7 +51,7 @@ struct get_turn_without_info
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;

View File

@@ -89,7 +89,7 @@ struct touch_interior : public base_turn_handler
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 @@ struct equal : public base_turn_handler
>
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 @@ struct crosses : public base_turn_handler
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 crosses : public base_turn_handler
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& )
{}
};

View File

@@ -93,6 +93,7 @@ private :
}
#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 @@ private :
{
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 @@ private :
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 @@ private :
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 @@ private :
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 @@ template
>
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;

View File

@@ -86,7 +86,7 @@ struct intersection_linestring_linestring_point
{
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;

View File

@@ -40,7 +40,7 @@ namespace dispatch
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 @@ namespace dispatch
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 @@ template<>
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 @@ template<>
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;
}

View File

@@ -37,10 +37,10 @@ namespace detail { namespace overlay
{
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 @@ inline void debug_traverse(Turn const& turn, Operation op,
{
std::cout << std::endl;
}
#endif
}
#else
inline void debug_traverse(Turn const& , Operation, std::string const& )
{
}
#endif
template <typename Info, typename Turn>

View File

@@ -36,7 +36,7 @@ namespace detail { namespace section
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;
}

View File

@@ -241,7 +241,7 @@ struct segments_direction
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);

View File

@@ -120,7 +120,7 @@ struct segments_intersection_points
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 @@ struct segments_intersection_points
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 @@ struct segments_intersection_points
{
return return_type();
}
static inline return_type error(std::string const& msg)
static inline return_type error(std::string const&)
{
return return_type();
}