Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59776 - in sandbox/geometry: boost/geometry/algorithms boost/geometry/algorithms/detail/overlay boost/geometry/algorithms/overlay boost/geometry/core libs/geometry/test/algorithms
From: barend.gehrels_at_[hidden]
Date: 2010-02-20 10:47:54


Author: barendgehrels
Date: 2010-02-20 10:47:52 EST (Sat, 20 Feb 2010)
New Revision: 59776
URL: http://svn.boost.org/trac/boost/changeset/59776

Log:
Silenced warnings
Text files modified:
   sandbox/geometry/boost/geometry/algorithms/area.hpp | 5 +++++
   sandbox/geometry/boost/geometry/algorithms/detail/overlay/ring_properties.hpp | 12 +++---------
   sandbox/geometry/boost/geometry/algorithms/num_points.hpp | 2 +-
   sandbox/geometry/boost/geometry/algorithms/overlay/assemble.hpp | 17 +++++++++++------
   sandbox/geometry/boost/geometry/algorithms/overlay/get_turns.hpp | 2 +-
   sandbox/geometry/boost/geometry/algorithms/overlay/traverse.hpp | 14 ++++++++++----
   sandbox/geometry/boost/geometry/core/interior_rings.hpp | 2 +-
   sandbox/geometry/libs/geometry/test/algorithms/intersection.vcproj | 4 ++--
   sandbox/geometry/libs/geometry/test/algorithms/intersects.vcproj | 4 ++--
   sandbox/geometry/libs/geometry/test/algorithms/overlaps.vcproj | 4 ++--
   sandbox/geometry/libs/geometry/test/algorithms/test_union.hpp | 12 ++++++------
   sandbox/geometry/libs/geometry/test/algorithms/union.vcproj | 5 +++--
   12 files changed, 47 insertions(+), 36 deletions(-)

Modified: sandbox/geometry/boost/geometry/algorithms/area.hpp
==============================================================================
--- sandbox/geometry/boost/geometry/algorithms/area.hpp (original)
+++ sandbox/geometry/boost/geometry/algorithms/area.hpp 2010-02-20 10:47:52 EST (Sat, 20 Feb 2010)
@@ -9,6 +9,7 @@
 #ifndef BOOST_GEOMETRY_ALGORITHMS_AREA_HPP
 #define BOOST_GEOMETRY_ALGORITHMS_AREA_HPP
 
+#include <boost/concept_check.hpp>
 #include <boost/mpl/if.hpp>
 #include <boost/range/functions.hpp>
 #include <boost/range/metafunctions.hpp>
@@ -109,6 +110,10 @@
     {
         assert_dimension<Ring, 2>();
 
+ // Ignore warning (because using static method sometimes) on strategy
+ boost::ignore_unused_variable_warning(strategy);
+
+
         // A closed linear_ring has at least four points,
         // if not, there is no (zero) area
         if (boost::size(ring) < 4)

Modified: sandbox/geometry/boost/geometry/algorithms/detail/overlay/ring_properties.hpp
==============================================================================
--- sandbox/geometry/boost/geometry/algorithms/detail/overlay/ring_properties.hpp (original)
+++ sandbox/geometry/boost/geometry/algorithms/detail/overlay/ring_properties.hpp 2010-02-20 10:47:52 EST (Sat, 20 Feb 2010)
@@ -83,7 +83,7 @@
         return abs(area) > abs(other.area);
     }
 
- inline ring_identifier const& id(int direction) const
+ inline ring_identifier const& id() const
     {
         // Return the id of ifself, or of the parent
         return positive() || parent_ring_id.source_index < 0
@@ -210,17 +210,11 @@
 template<typename Prop>
 struct sort_on_id_or_parent_id
 {
-private :
- int m_direction;
 public :
- sort_on_id_or_parent_id(int direction)
- : m_direction(direction)
- {}
-
     inline bool operator()(Prop const& left, Prop const& right) const
     {
- ring_identifier const& left_id = left.id(m_direction);
- ring_identifier const& right_id = right.id(m_direction);
+ ring_identifier const& left_id = left.id();
+ ring_identifier const& right_id = right.id();
 
         // If it is the same, sort on size descending
         return left_id == right_id

Modified: sandbox/geometry/boost/geometry/algorithms/num_points.hpp
==============================================================================
--- sandbox/geometry/boost/geometry/algorithms/num_points.hpp (original)
+++ sandbox/geometry/boost/geometry/algorithms/num_points.hpp 2010-02-20 10:47:52 EST (Sat, 20 Feb 2010)
@@ -39,7 +39,7 @@
 template <typename Geometry, std::size_t D>
 struct other_count
 {
- static inline std::size_t apply(Geometry const& geometry)
+ static inline std::size_t apply(Geometry const& )
     {
         return D;
     }

Modified: sandbox/geometry/boost/geometry/algorithms/overlay/assemble.hpp
==============================================================================
--- sandbox/geometry/boost/geometry/algorithms/overlay/assemble.hpp (original)
+++ sandbox/geometry/boost/geometry/algorithms/overlay/assemble.hpp 2010-02-20 10:47:52 EST (Sat, 20 Feb 2010)
@@ -57,7 +57,7 @@
 struct get_ring<ring_tag>
 {
     template<typename Ring>
- static inline Ring const& apply(ring_identifier const& id, Ring const& ring)
+ static inline Ring const& apply(ring_identifier const& , Ring const& ring)
     {
         return ring;
     }
@@ -80,7 +80,7 @@
 struct get_ring<box_tag>
 {
     template<typename Box>
- static inline Box const& apply(ring_identifier const& id,
+ static inline Box const& apply(ring_identifier const& ,
                     Box const& box)
     {
         return box;
@@ -375,6 +375,7 @@
         }
     }
 
+ /***
     template <int Dimension, typename Selection, typename Map>
     static inline void divide_and_conquer(Selection& selection, Map& map,
             Geometry1 const& geometry1, Geometry2 const& geometry2,
@@ -418,6 +419,7 @@
         divide_and_conquer<1 - Dimension>(upper_sel, map, geometry1, geometry2,
                     collection, direction, dissolve, upper, iteration + 1, n);
     }
+ ***/
 
     static inline void enrich(Container& container,
             Geometry1 const& geometry1, Geometry2 const& geometry2,
@@ -464,7 +466,7 @@
     static inline void apply(Container& container,
             Geometry1 const& geometry1, Geometry2 const& geometry2,
             RingCollection const& collection,
- int direction, bool dissolve, Box const& box)
+ int direction, bool dissolve, Box const& )
     {
         if (boost::size(container) == 0)
         {
@@ -481,6 +483,8 @@
             std::cout << *it << std::endl;
         }
 #endif
+
+ /***
         return;
 
         // Method using divide and conquer (does NOT work corretly!)
@@ -498,6 +502,7 @@
         std::map<std::pair<item_type*, item_type*>, bool> map;
         divide_and_conquer<1>(selection, map, geometry1, geometry2, collection,
                     direction, dissolve, box);
+ ***/
     }
 };
 
@@ -571,7 +576,7 @@
             // If it is an interior ring, it is included if
             // it's parent-id matches the id of the outputted exterior ring
             if (result_filled
- && it->id(direction) == previous_id
+ && it->id() == previous_id
                 && it->included(direction, dissolve))
             {
                 if (it->ring_id.source_index == 0)
@@ -731,7 +736,7 @@
                     sort_on_id_or_parent_id
                         <
                             ring_properties<point_type>
- >(direction));
+ >());
         }
 #ifdef BOOST_GEOMETRY_DEBUG_ASSEMBLE
 std::cout << "assemble.add rings" << std::endl;
@@ -753,7 +758,7 @@
     static inline OutputIterator apply(
                 Geometry1 const& geometry1, Geometry2 const& geometry2,
                 OutputIterator out,
- Strategy const& strategy)
+ Strategy const& )
     {
         if (geometry::num_points(geometry1) == 0 && geometry::num_points(geometry2) == 0)
         {

Modified: sandbox/geometry/boost/geometry/algorithms/overlay/get_turns.hpp
==============================================================================
--- sandbox/geometry/boost/geometry/algorithms/overlay/get_turns.hpp (original)
+++ sandbox/geometry/boost/geometry/algorithms/overlay/get_turns.hpp 2010-02-20 10:47:52 EST (Sat, 20 Feb 2010)
@@ -509,7 +509,7 @@
                 int multi_index, int ring_index,
                 int source_id2, Box const& box,
                 Turns& turns,
- InterruptPolicy& interrupt_policy)
+ InterruptPolicy& )
     {
         if (boost::size(range) <= 1)
         {

Modified: sandbox/geometry/boost/geometry/algorithms/overlay/traverse.hpp
==============================================================================
--- sandbox/geometry/boost/geometry/algorithms/overlay/traverse.hpp (original)
+++ sandbox/geometry/boost/geometry/algorithms/overlay/traverse.hpp 2010-02-20 10:47:52 EST (Sat, 20 Feb 2010)
@@ -140,7 +140,6 @@
 inline bool select_next_ip(operation_type operation,
             Turn& turn,
             segment_identifier const& seg_id,
- Iterator const& start,
             Iterator& selected)
 {
     bool has_tp = false;
@@ -192,9 +191,16 @@
 inline void backtrack(std::size_t size_at_start, bool& fail,
             Rings& rings, typename boost::range_value<Rings>::type& ring,
             Turns& turns, typename boost::range_value<Turns>::type& turn,
+#ifdef BOOST_GEOMETRY_OVERLAY_REPORT_WKT
             std::string const& reason,
             Geometry1 const& geometry1,
- Geometry2 const& geometry2)
+ Geometry2 const& geometry2
+#else
+ std::string const& ,
+ Geometry1 const& ,
+ Geometry2 const&
+#endif
+ )
 {
     fail = true;
 
@@ -286,7 +292,7 @@
                                         operation,
                                         *current,
                                         current_seg_id,
- boost::end(it->operations),
+
                                         current_iit))
                         {
                             detail::overlay::backtrack(
@@ -336,7 +342,7 @@
                                                 operation,
                                                 *current,
                                                 current_seg_id,
- iit,
+
                                                 current_iit))
                                     {
                                         // Should not occur in valid (non-self-intersecting) polygons

Modified: sandbox/geometry/boost/geometry/core/interior_rings.hpp
==============================================================================
--- sandbox/geometry/boost/geometry/core/interior_rings.hpp (original)
+++ sandbox/geometry/boost/geometry/core/interior_rings.hpp 2010-02-20 10:47:52 EST (Sat, 20 Feb 2010)
@@ -124,7 +124,7 @@
 template <typename Ring>
 struct num_interior_rings<ring_tag, Ring>
 {
- static inline std::size_t apply(Ring const& ring)
+ static inline std::size_t apply(Ring const& )
     {
         return 0;
     }

Modified: sandbox/geometry/libs/geometry/test/algorithms/intersection.vcproj
==============================================================================
--- sandbox/geometry/libs/geometry/test/algorithms/intersection.vcproj (original)
+++ sandbox/geometry/libs/geometry/test/algorithms/intersection.vcproj 2010-02-20 10:47:52 EST (Sat, 20 Feb 2010)
@@ -41,7 +41,7 @@
                         <Tool
                                 Name="VCCLCompilerTool"
                                 Optimization="0"
- AdditionalIncludeDirectories="../../../..;..;../../example/contrib/gd-2.0.35"
+ AdditionalIncludeDirectories="../../../..;.."
                                 PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NONDLL;_CRT_SECURE_NO_WARNINGS;TEST_WITH_SVG"
                                 MinimalRebuild="true"
                                 ExceptionHandling="2"
@@ -117,7 +117,7 @@
                         />
                         <Tool
                                 Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="../../../..;..;../../example/contrib/gd-2.0.35"
+ AdditionalIncludeDirectories="../../../..;.."
                                 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NONDLL;_CRT_SECURE_NO_WARNINGS"
                                 ExceptionHandling="2"
                                 RuntimeLibrary="2"

Modified: sandbox/geometry/libs/geometry/test/algorithms/intersects.vcproj
==============================================================================
--- sandbox/geometry/libs/geometry/test/algorithms/intersects.vcproj (original)
+++ sandbox/geometry/libs/geometry/test/algorithms/intersects.vcproj 2010-02-20 10:47:52 EST (Sat, 20 Feb 2010)
@@ -41,7 +41,7 @@
                         <Tool
                                 Name="VCCLCompilerTool"
                                 Optimization="0"
- AdditionalIncludeDirectories="../../../..;..;../../example/contrib/gd-2.0.35"
+ AdditionalIncludeDirectories="../../../..;.."
                                 PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NONDLL;_CRT_SECURE_NO_WARNINGS;TEST_WITH_SVG"
                                 MinimalRebuild="true"
                                 ExceptionHandling="2"
@@ -117,7 +117,7 @@
                         />
                         <Tool
                                 Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="../../../..;..;../../example/contrib/gd-2.0.35"
+ AdditionalIncludeDirectories="../../../..;.."
                                 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NONDLL;_CRT_SECURE_NO_WARNINGS"
                                 ExceptionHandling="2"
                                 RuntimeLibrary="2"

Modified: sandbox/geometry/libs/geometry/test/algorithms/overlaps.vcproj
==============================================================================
--- sandbox/geometry/libs/geometry/test/algorithms/overlaps.vcproj (original)
+++ sandbox/geometry/libs/geometry/test/algorithms/overlaps.vcproj 2010-02-20 10:47:52 EST (Sat, 20 Feb 2010)
@@ -41,7 +41,7 @@
                         <Tool
                                 Name="VCCLCompilerTool"
                                 Optimization="0"
- AdditionalIncludeDirectories="../../../..;..;../../example/contrib/gd-2.0.35"
+ AdditionalIncludeDirectories="../../../..;.."
                                 PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NONDLL;_CRT_SECURE_NO_WARNINGS;TEST_WITH_SVG"
                                 MinimalRebuild="true"
                                 ExceptionHandling="2"
@@ -117,7 +117,7 @@
                         />
                         <Tool
                                 Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="../../../..;..;../../example/contrib/gd-2.0.35"
+ AdditionalIncludeDirectories="../../../..;.."
                                 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NONDLL;_CRT_SECURE_NO_WARNINGS"
                                 ExceptionHandling="2"
                                 RuntimeLibrary="2"

Modified: sandbox/geometry/libs/geometry/test/algorithms/test_union.hpp
==============================================================================
--- sandbox/geometry/libs/geometry/test/algorithms/test_union.hpp (original)
+++ sandbox/geometry/libs/geometry/test/algorithms/test_union.hpp 2010-02-20 10:47:52 EST (Sat, 20 Feb 2010)
@@ -34,8 +34,8 @@
 
 template <typename OutputType, typename G1, typename G2>
 void test_union(std::string const& caseid, G1 const& g1, G2 const& g2,
- int expected_count, int expected_hole_count,
- int expected_point_count, double expected_area,
+ std::size_t expected_count, std::size_t expected_hole_count,
+ std::size_t expected_point_count, double expected_area,
         double percentage)
 {
     typedef typename boost::geometry::coordinate_type<G1>::type coordinate_type;
@@ -43,8 +43,8 @@
     boost::geometry::union_inserter<OutputType>(g1, g2, std::back_inserter(clip));
 
     double area = 0;
- int n = 0;
- int holes = 0;
+ std::size_t n = 0;
+ std::size_t holes = 0;
     for (typename std::vector<OutputType>::iterator it = clip.begin();
             it != clip.end(); ++it)
     {
@@ -108,8 +108,8 @@
 
 template <typename OutputType, typename G1, typename G2>
 void test_one(std::string const& caseid, std::string const& wkt1, std::string const& wkt2,
- int expected_count, int expected_hole_count,
- int expected_point_count, double expected_area,
+ std::size_t expected_count, std::size_t expected_hole_count,
+ std::size_t expected_point_count, double expected_area,
         double percentage = 0.001)
 {
     G1 g1;

Modified: sandbox/geometry/libs/geometry/test/algorithms/union.vcproj
==============================================================================
--- sandbox/geometry/libs/geometry/test/algorithms/union.vcproj (original)
+++ sandbox/geometry/libs/geometry/test/algorithms/union.vcproj 2010-02-20 10:47:52 EST (Sat, 20 Feb 2010)
@@ -41,12 +41,13 @@
                         <Tool
                                 Name="VCCLCompilerTool"
                                 Optimization="0"
- AdditionalIncludeDirectories="../../../..;..;../../example/contrib/gd-2.0.35"
+ AdditionalIncludeDirectories="../../../..;.."
                                 PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NONDLL;_CRT_SECURE_NO_WARNINGS;TEST_WITH_SVG"
                                 MinimalRebuild="true"
                                 ExceptionHandling="2"
                                 RuntimeLibrary="3"
                                 UsePrecompiledHeader="0"
+ WarningLevel="3"
                                 DebugInformationFormat="3"
                         />
                         <Tool
@@ -117,7 +118,7 @@
                         />
                         <Tool
                                 Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="../../../..;..;../../example/contrib/gd-2.0.35"
+ AdditionalIncludeDirectories="../../../..;.."
                                 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NONDLL;_CRT_SECURE_NO_WARNINGS"
                                 ExceptionHandling="2"
                                 RuntimeLibrary="2"


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