Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r62178 - in sandbox/gtl/boost/polygon: . detail
From: lucanus.j.simonson_at_[hidden]
Date: 2010-05-24 14:40:16


Author: ljsimons
Date: 2010-05-24 14:40:15 EDT (Mon, 24 May 2010)
New Revision: 62178
URL: http://svn.boost.org/trac/boost/changeset/62178

Log:
fixed inspect errors
Text files modified:
   sandbox/gtl/boost/polygon/detail/polygon_arbitrary_formation.hpp | 23 ++++++++++++-----------
   sandbox/gtl/boost/polygon/detail/scan_arbitrary.hpp | 4 ++--
   sandbox/gtl/boost/polygon/isotropy.hpp | 6 +++---
   sandbox/gtl/boost/polygon/polygon_set_data.hpp | 6 +++---
   sandbox/gtl/boost/polygon/polygon_traits.hpp | 4 ++--
   5 files changed, 22 insertions(+), 21 deletions(-)

Modified: sandbox/gtl/boost/polygon/detail/polygon_arbitrary_formation.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/detail/polygon_arbitrary_formation.hpp (original)
+++ sandbox/gtl/boost/polygon/detail/polygon_arbitrary_formation.hpp 2010-05-24 14:40:15 EDT (Mon, 24 May 2010)
@@ -280,9 +280,9 @@
         pack_ = that.pack_;
         return *this; }
       inline bool operator () (const half_edge& elm1, const half_edge& elm2) const {
- if(std::max(elm1.first.y(), elm1.second.y()) < std::min(elm2.first.y(), elm2.second.y()))
+ if((std::max)(elm1.first.y(), elm1.second.y()) < (std::min)(elm2.first.y(), elm2.second.y()))
           return true;
- if(std::min(elm1.first.y(), elm1.second.y()) > std::max(elm2.first.y(), elm2.second.y()))
+ if((std::min)(elm1.first.y(), elm1.second.y()) > (std::max)(elm2.first.y(), elm2.second.y()))
           return false;
 
         //check if either x of elem1 is equal to x_
@@ -458,6 +458,13 @@
         Point result(x_unit, y_unit);
         if(!projected && !contains(rect1, result, true)) return false;
         if(!projected && !contains(rect2, result, true)) return false;
+ if(projected) {
+ rectangle_data<long double> inf_rect((long double)(std::numeric_limits<Unit>::min)(),
+ (long double) (std::numeric_limits<Unit>::min)(),
+ (long double)(std::numeric_limits<Unit>::max)(),
+ (long double) (std::numeric_limits<Unit>::max)() );
+ return contains(inf_rect, intersection, true);
+ }
         intersection = result;
         return true;
       }
@@ -472,13 +479,7 @@
               return true;
           }
         } else {
- if(lazy_success) {
- rectangle_data<Unit> inf_rect((std::numeric_limits<Unit>::min)(), (std::numeric_limits<Unit>::min)(),
- (std::numeric_limits<Unit>::max)(), (std::numeric_limits<Unit>::max)() );
- return contains(inf_rect, intersection, true);
- } else {
- return false;
- }
+ return lazy_success;
         }
         typedef rectangle_data<Unit> Rectangle;
         Rectangle rect1, rect2;
@@ -739,9 +740,9 @@
       inline less_vertex_half_edge(const less_vertex_half_edge& that) : x_(that.x_), justBefore_(that.justBefore_) {}
       inline less_vertex_half_edge& operator=(const less_vertex_half_edge& that) { x_ = that.x_; justBefore_ = that.justBefore_; return *this; }
       inline bool operator () (const vertex_half_edge& elm1, const vertex_half_edge& elm2) const {
- if(std::max(elm1.pt.y(), elm1.other_pt.y()) < std::min(elm2.pt.y(), elm2.other_pt.y()))
+ if((std::max)(elm1.pt.y(), elm1.other_pt.y()) < (std::min)(elm2.pt.y(), elm2.other_pt.y()))
           return true;
- if(std::min(elm1.pt.y(), elm1.other_pt.y()) > std::max(elm2.pt.y(), elm2.other_pt.y()))
+ if((std::min)(elm1.pt.y(), elm1.other_pt.y()) > (std::max)(elm2.pt.y(), elm2.other_pt.y()))
           return false;
         //check if either x of elem1 is equal to x_
         Unit localx = *x_;

Modified: sandbox/gtl/boost/polygon/detail/scan_arbitrary.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/detail/scan_arbitrary.hpp (original)
+++ sandbox/gtl/boost/polygon/detail/scan_arbitrary.hpp 2010-05-24 14:40:15 EDT (Mon, 24 May 2010)
@@ -128,11 +128,11 @@
       }
       for(iT itr = begin; itr != end; ++itr) {
         typename std::map<Unit, std::vector<std::pair<half_edge, segment_id> > >::iterator lb =
- bins.lower_bound(std::min((*itr).first.first.y(), (*itr).first.second.y()));
+ bins.lower_bound((std::min)((*itr).first.first.y(), (*itr).first.second.y()));
         if(lb != bins.begin())
           --lb;
         typename std::map<Unit, std::vector<std::pair<half_edge, segment_id> > >::iterator ub =
- bins.upper_bound(std::max((*itr).first.first.y(), (*itr).first.second.y()));
+ bins.upper_bound((std::max)((*itr).first.first.y(), (*itr).first.second.y()));
         for( ; lb != ub; ++lb) {
           (*lb).second.push_back(*itr);
         }

Modified: sandbox/gtl/boost/polygon/isotropy.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/isotropy.hpp (original)
+++ sandbox/gtl/boost/polygon/isotropy.hpp 2010-05-24 14:40:15 EDT (Mon, 24 May 2010)
@@ -305,13 +305,13 @@
   struct area_type_by_domain<manhattan_domain, coordinate_type> {
     typedef typename coordinate_traits<coordinate_type>::manhattan_area_type type; };
 
- struct y_c_edist : gtl_yes {};
+ struct y_c_edist : gtl_yes {};
 
   template <typename coordinate_type_1, typename coordinate_type_2>
     typename enable_if<
     typename gtl_and_3<y_c_edist, typename gtl_same_type<typename geometry_concept<coordinate_type_1>::type, coordinate_concept>::type,
- typename gtl_same_type<typename geometry_concept<coordinate_type_1>::type, coordinate_concept>::type>::type,
- typename coordinate_traits<coordinate_type_1>::coordinate_difference>::type
+ typename gtl_same_type<typename geometry_concept<coordinate_type_1>::type, coordinate_concept>::type>::type,
+ typename coordinate_traits<coordinate_type_1>::coordinate_difference>::type
   euclidean_distance(const coordinate_type_1& lvalue, const coordinate_type_2& rvalue) {
     typedef typename coordinate_traits<coordinate_type_1>::coordinate_difference Unit;
     return (lvalue < rvalue) ? (Unit)rvalue - (Unit)lvalue : (Unit)lvalue - (Unit)rvalue;

Modified: sandbox/gtl/boost/polygon/polygon_set_data.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/polygon_set_data.hpp (original)
+++ sandbox/gtl/boost/polygon/polygon_set_data.hpp 2010-05-24 14:40:15 EDT (Mon, 24 May 2010)
@@ -431,7 +431,7 @@
     template <typename geometry_type>
     inline polygon_set_data&
     insert_with_resize_dispatch(const geometry_type& poly, coordinate_type resizing, bool corner_fill_arc, unsigned int num_circle_segments, bool hole,
- polygon_with_holes_concept tag) {
+ polygon_with_holes_concept tag) {
       insert_with_resize_dispatch(poly, resizing, corner_fill_arc, num_circle_segments, hole, polygon_concept());
       for(typename polygon_with_holes_traits<geometry_type>::iterator_holes_type itr =
             begin_holes(poly); itr != end_holes(poly);
@@ -444,7 +444,7 @@
     template <typename geometry_type>
     inline polygon_set_data&
     insert_with_resize_dispatch(const geometry_type& poly, coordinate_type resizing, bool corner_fill_arc, unsigned int num_circle_segments, bool hole,
- polygon_concept tag) {
+ polygon_concept tag) {
 
       if (resizing==0)
          return *this;
@@ -503,7 +503,7 @@
         v = point_data<double>(v.x()/s,v.y()/s);
         point_data<T> curr_prev;
         if (prev_concave)
- //TODO missing round_down()
+ //TODO missing round_down()
           curr_prev = point_data<T>(first->x()+v.x(),first->y()+v.y());
         else
           curr_prev = prev_point;

Modified: sandbox/gtl/boost/polygon/polygon_traits.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/polygon_traits.hpp (original)
+++ sandbox/gtl/boost/polygon/polygon_traits.hpp 2010-05-24 14:40:15 EDT (Mon, 24 May 2010)
@@ -1294,8 +1294,8 @@
     holes_iterator itH = begin_holes( polygon );
     while( itH != end_holes( polygon ) ) {
       if( contains( *itH, point, !consider_touch ) ) {
- isInside = false;
- break;
+ isInside = false;
+ break;
       }
       ++itH;
     }


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