|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r83780 - in trunk/boost/geometry: algorithms algorithms/detail/overlay extensions/io/svg policies/relate strategies/cartesian
From: barend.gehrels_at_[hidden]
Date: 2013-04-06 17:28:39
Author: barendgehrels
Date: 2013-04-06 17:28:38 EDT (Sat, 06 Apr 2013)
New Revision: 83780
URL: http://svn.boost.org/trac/boost/changeset/83780
Log:
[geometry] Ticket #8405 -> silenced various warnings using MSVC /W4
Text files modified:
trunk/boost/geometry/algorithms/correct.hpp | 4 ++--
trunk/boost/geometry/algorithms/detail/overlay/get_turns.hpp | 12 ++++++++++--
trunk/boost/geometry/algorithms/distance.hpp | 2 ++
trunk/boost/geometry/algorithms/length.hpp | 2 ++
trunk/boost/geometry/algorithms/num_points.hpp | 2 +-
trunk/boost/geometry/algorithms/within.hpp | 4 ++++
trunk/boost/geometry/extensions/io/svg/write_svg.hpp | 6 +++---
trunk/boost/geometry/policies/relate/intersection_points.hpp | 4 ++--
trunk/boost/geometry/strategies/cartesian/cart_intersect.hpp | 8 ++++----
trunk/boost/geometry/strategies/cartesian/distance_projected_point.hpp | 1 +
10 files changed, 31 insertions(+), 14 deletions(-)
Modified: trunk/boost/geometry/algorithms/correct.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/correct.hpp (original)
+++ trunk/boost/geometry/algorithms/correct.hpp 2013-04-06 17:28:38 EDT (Sat, 06 Apr 2013)
@@ -131,13 +131,13 @@
{
// check if closed, if not, close it
bool const disjoint = geometry::disjoint(*boost::begin(r), *(boost::end(r) - 1));
- closure_selector const s = geometry::closure<Ring>::value;
+ closure_selector /*const*/ s = geometry::closure<Ring>::value;
if (disjoint && (s == closed))
{
geometry::append(r, *boost::begin(r));
}
- if (! disjoint && geometry::closure<Ring>::value != closed)
+ if (! disjoint && s != closed)
{
// Open it by removing last point
geometry::traits::resize<Ring>::apply(r, boost::size(r) - 1);
Modified: trunk/boost/geometry/algorithms/detail/overlay/get_turns.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/detail/overlay/get_turns.hpp (original)
+++ trunk/boost/geometry/algorithms/detail/overlay/get_turns.hpp 2013-04-06 17:28:38 EDT (Sat, 06 Apr 2013)
@@ -14,12 +14,11 @@
#include <map>
#include <boost/array.hpp>
+#include <boost/concept_check.hpp>
#include <boost/mpl/if.hpp>
#include <boost/range.hpp>
#include <boost/typeof/typeof.hpp>
-#include <boost/tuple/tuple.hpp>
-
#include <boost/geometry/core/access.hpp>
#include <boost/geometry/core/coordinate_dimension.hpp>
#include <boost/geometry/core/reverse_dispatch.hpp>
@@ -138,6 +137,11 @@
// About first condition: will be optimized by compiler (static)
// It checks if it is areal (box,ring,(multi)polygon
int const n = int(section.range_count);
+
+ boost::ignore_unused_variable_warning(n);
+ boost::ignore_unused_variable_warning(index1);
+ boost::ignore_unused_variable_warning(index2);
+
return boost::is_same
<
typename tag_cast
@@ -162,6 +166,8 @@
Turns& turns,
InterruptPolicy& interrupt_policy)
{
+ boost::ignore_unused_variable_warning(interrupt_policy);
+
cview_type1 cview1(range_by_section(geometry1, sec1));
cview_type2 cview2(range_by_section(geometry2, sec2));
view_type1 view1(cview1);
@@ -599,6 +605,8 @@
Turns& turns,
InterruptPolicy& interrupt_policy)
{
+ boost::ignore_unused_variable_warning(interrupt_policy);
+
// Depending on code some relations can be left out
typedef typename boost::range_value<Turns>::type turn_info;
Modified: trunk/boost/geometry/algorithms/distance.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/distance.hpp (original)
+++ trunk/boost/geometry/algorithms/distance.hpp 2013-04-06 17:28:38 EDT (Sat, 06 Apr 2013)
@@ -15,6 +15,7 @@
#define BOOST_GEOMETRY_ALGORITHMS_DISTANCE_HPP
+#include <boost/concept_check.hpp>
#include <boost/mpl/if.hpp>
#include <boost/range.hpp>
#include <boost/typeof/typeof.hpp>
@@ -55,6 +56,7 @@
static inline typename return_type<Strategy>::type apply(P1 const& p1,
P2 const& p2, Strategy const& strategy)
{
+ boost::ignore_unused_variable_warning(strategy);
return strategy.apply(p1, p2);
}
};
Modified: trunk/boost/geometry/algorithms/length.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/length.hpp (original)
+++ trunk/boost/geometry/algorithms/length.hpp 2013-04-06 17:28:38 EDT (Sat, 06 Apr 2013)
@@ -16,6 +16,7 @@
#include <iterator>
+#include <boost/concept_check.hpp>
#include <boost/range.hpp>
#include <boost/mpl/fold.hpp>
@@ -84,6 +85,7 @@
static inline return_type apply(
Range const& range, Strategy const& strategy)
{
+ boost::ignore_unused_variable_warning(strategy);
typedef typename closeable_view<Range const, Closure>::type view_type;
typedef typename boost::range_iterator
<
Modified: trunk/boost/geometry/algorithms/num_points.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/num_points.hpp (original)
+++ trunk/boost/geometry/algorithms/num_points.hpp 2013-04-06 17:28:38 EDT (Sat, 06 Apr 2013)
@@ -48,7 +48,7 @@
std::size_t n = boost::size(range);
if (add_for_open && n > 0)
{
- closure_selector const s = geometry::closure<Range>::value;
+ closure_selector /*const*/ s = geometry::closure<Range>::value;
if (s == open)
{
Modified: trunk/boost/geometry/algorithms/within.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/within.hpp (original)
+++ trunk/boost/geometry/algorithms/within.hpp 2013-04-06 17:28:38 EDT (Sat, 06 Apr 2013)
@@ -17,6 +17,7 @@
#include <cstddef>
+#include <boost/concept_check.hpp>
#include <boost/range.hpp>
#include <boost/typeof/typeof.hpp>
@@ -65,6 +66,7 @@
static inline int apply(Point const& point, Ring const& ring,
Strategy const& strategy)
{
+ boost::ignore_unused_variable_warning(strategy);
if (int(boost::size(ring))
< core_detail::closure::minimum_ring_size<Closure>::value)
{
@@ -180,6 +182,7 @@
template <typename Strategy>
static inline bool apply(Point const& point, Box const& box, Strategy const& strategy)
{
+ boost::ignore_unused_variable_warning(strategy);
return strategy.apply(point, box);
}
};
@@ -191,6 +194,7 @@
static inline bool apply(Box1 const& box1, Box2 const& box2, Strategy const& strategy)
{
assert_dimension_equal<Box1, Box2>();
+ boost::ignore_unused_variable_warning(strategy);
return strategy.apply(box1, box2);
}
};
Modified: trunk/boost/geometry/extensions/io/svg/write_svg.hpp
==============================================================================
--- trunk/boost/geometry/extensions/io/svg/write_svg.hpp (original)
+++ trunk/boost/geometry/extensions/io/svg/write_svg.hpp 2013-04-06 17:28:38 EDT (Sat, 06 Apr 2013)
@@ -57,7 +57,7 @@
{
template <typename Char, typename Traits>
static inline void apply(std::basic_ostream<Char, Traits>& os,
- Box const& box, std::string const& style, int size)
+ Box const& box, std::string const& style, int )
{
// Prevent invisible boxes, making them >=1, using "max"
BOOST_USING_STD_MAX();
@@ -86,7 +86,7 @@
{
template <typename Char, typename Traits>
static inline void apply(std::basic_ostream<Char, Traits>& os,
- Range const& range, std::string const& style, int size)
+ Range const& range, std::string const& style, int )
{
typedef typename boost::range_iterator<Range const>::type iterator;
@@ -114,7 +114,7 @@
{
template <typename Char, typename Traits>
static inline void apply(std::basic_ostream<Char, Traits>& os,
- Polygon const& polygon, std::string const& style, int size)
+ Polygon const& polygon, std::string const& style, int )
{
typedef typename geometry::ring_type<Polygon>::type ring_type;
typedef typename boost::range_iterator<ring_type const>::type iterator_type;
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 2013-04-06 17:28:38 EDT (Sat, 06 Apr 2013)
@@ -46,8 +46,8 @@
static inline return_type segments_intersect(side_info const&,
R const& r,
coordinate_type const& dx1, coordinate_type const& dy1,
- coordinate_type const& dx2, coordinate_type const& dy2,
- S1 const& s1, S2 const& s2)
+ coordinate_type const& , coordinate_type const& ,
+ S1 const& s1, S2 const& )
{
typedef typename geometry::coordinate_type
<
Modified: trunk/boost/geometry/strategies/cartesian/cart_intersect.hpp
==============================================================================
--- trunk/boost/geometry/strategies/cartesian/cart_intersect.hpp (original)
+++ trunk/boost/geometry/strategies/cartesian/cart_intersect.hpp 2013-04-06 17:28:38 EDT (Sat, 06 Apr 2013)
@@ -215,7 +215,7 @@
return Policy::disjoint();
}
- robustness_handle_meeting(a, b, sides, dx_a, dy_a, wx, wy, d, r);
+ //robustness_handle_meeting(a, b, sides, dx_a, dy_a, wx, wy, d, r);
if (robustness_verify_disjoint_at_one_collinear(a, b, sides))
{
@@ -295,7 +295,7 @@
}
static inline void robustness_verify_collinear(
- segment_type1 const& a, segment_type2 const& b,
+ segment_type1 const& , segment_type2 const& ,
bool a_is_point, bool b_is_point,
side_info& sides,
bool& collinear)
@@ -413,7 +413,7 @@
return false;
}
-
+/*
// If r is one, or zero, segments should meet and their endpoints.
// Robustness issue: check if this is really the case.
// It turns out to be no problem, see buffer test #rt_s1 (and there are many cases generated)
@@ -447,7 +447,7 @@
}
}
}
-
+*/
template <std::size_t Dimension>
static inline bool verify_disjoint(segment_type1 const& a,
segment_type2 const& b)
Modified: trunk/boost/geometry/strategies/cartesian/distance_projected_point.hpp
==============================================================================
--- trunk/boost/geometry/strategies/cartesian/distance_projected_point.hpp (original)
+++ trunk/boost/geometry/strategies/cartesian/distance_projected_point.hpp 2013-04-06 17:28:38 EDT (Sat, 06 Apr 2013)
@@ -162,6 +162,7 @@
<
Strategy, Point, fp_point_type
>::apply(strategy);
+ boost::ignore_unused_variable_warning(fp_strategy);
fp_point_type projected;
geometry::convert(p1, projected);
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