Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r54292 - sandbox/gtl/boost/polygon
From: lucanus.j.simonson_at_[hidden]
Date: 2009-06-23 19:08:10


Author: ljsimons
Date: 2009-06-23 19:08:08 EDT (Tue, 23 Jun 2009)
New Revision: 54292
URL: http://svn.boost.org/trac/boost/changeset/54292

Log:
fixed tabs and min/max violations
Text files modified:
   sandbox/gtl/boost/polygon/boolean_op.hpp | 6 ++--
   sandbox/gtl/boost/polygon/boolean_op_45.hpp | 12 +++++-----
   sandbox/gtl/boost/polygon/gtl_boost_unit_test.cpp | 8 +++++++
   sandbox/gtl/boost/polygon/interval_concept.hpp | 18 ++++++++--------
   sandbox/gtl/boost/polygon/isotropy.hpp | 4 +-
   sandbox/gtl/boost/polygon/point_3d_concept.hpp | 4 +-
   sandbox/gtl/boost/polygon/point_concept.hpp | 8 +++---
   sandbox/gtl/boost/polygon/polygon.hpp | 27 ++++--------------------
   sandbox/gtl/boost/polygon/polygon_45_formation.hpp | 10 ++++----
   sandbox/gtl/boost/polygon/polygon_45_set_data.hpp | 18 ++++++++--------
   sandbox/gtl/boost/polygon/polygon_45_touch.hpp | 2
   sandbox/gtl/boost/polygon/polygon_90_set_data.hpp | 8 +++---
   sandbox/gtl/boost/polygon/polygon_90_touch.hpp | 2
   sandbox/gtl/boost/polygon/polygon_arbitrary_formation.hpp | 26 +++++++++++-----------
   sandbox/gtl/boost/polygon/polygon_data.hpp | 4 +-
   sandbox/gtl/boost/polygon/polygon_formation.hpp | 6 ++--
   sandbox/gtl/boost/polygon/polygon_set_data.hpp | 16 +++++++-------
   sandbox/gtl/boost/polygon/polygon_traits.hpp | 4 +-
   sandbox/gtl/boost/polygon/rectangle_concept.hpp | 4 +-
   sandbox/gtl/boost/polygon/rectangle_formation.hpp | 16 +++++++-------
   sandbox/gtl/boost/polygon/scan_arbitrary.hpp | 44 ++++++++++++++++++++--------------------
   21 files changed, 119 insertions(+), 128 deletions(-)

Modified: sandbox/gtl/boost/polygon/boolean_op.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/boolean_op.hpp (original)
+++ sandbox/gtl/boost/polygon/boolean_op.hpp 2009-06-23 19:08:08 EDT (Tue, 23 Jun 2009)
@@ -386,10 +386,10 @@
     //typename std::vector<std::pair<Unit, std::pair<Unit, int> > >::const_iterator itr1 = input1.begin();
     //typename std::vector<std::pair<Unit, std::pair<Unit, int> > >::const_iterator itr2 = input2.begin();
     std::vector<std::pair<interval_data<Unit>, int> > container;
- //output.reserve(std::max(input1.size(), input2.size()));
+ //output.reserve((std::max)(input1.size(), input2.size()));
 
     //consider eliminating dependecy on limits with bool flag for initial state
- Unit UnitMax = std::numeric_limits<Unit>::max();
+ Unit UnitMax = (std::numeric_limits<Unit>::max)();
     Unit prevCoord = UnitMax;
     Unit prevPosition = UnitMax;
     T count(defaultCount);
@@ -505,7 +505,7 @@
       std::vector<std::pair<Unit, std::pair<Unit, int> > > output;
       output.reserve(input.size());
       //consider eliminating dependecy on limits with bool flag for initial state
- Unit UnitMax = std::numeric_limits<Unit>::max();
+ Unit UnitMax = (std::numeric_limits<Unit>::max)();
       Unit prevPos = UnitMax;
       Unit prevY = UnitMax;
       int count = 0;

Modified: sandbox/gtl/boost/polygon/boolean_op_45.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/boolean_op_45.hpp (original)
+++ sandbox/gtl/boost/polygon/boolean_op_45.hpp 2009-06-23 19:08:08 EDT (Tue, 23 Jun 2009)
@@ -459,12 +459,12 @@
       int justBefore_;
     public:
       inline Scan45() : scanData_(), crossQueue_(), crossVector_(),
- x_(std::numeric_limits<Unit>::min()), justBefore_(false) {
+ x_((std::numeric_limits<Unit>::min)()), justBefore_(false) {
         lessScan45Element<CountType> lessElm(&x_, &justBefore_);
         scanData_ = std::set<Scan45ElementT<CountType>, lessScan45Element<CountType> >(lessElm);
       }
       inline Scan45(const Scan45& that) : scanData_(), crossQueue_(), crossVector_(),
- x_(std::numeric_limits<Unit>::min()), justBefore_(false) {
+ x_((std::numeric_limits<Unit>::min)()), justBefore_(false) {
         (*this) = that; }
       inline Scan45& operator=(const Scan45& that) {
         x_ = that.x_;
@@ -508,7 +508,7 @@
             if(!crossQueue_.empty() &&
                (*crossQueue_.begin()).x() < nextX) {
               //std::cout << "4\n";
- nextX = std::min(nextX, (*crossQueue_.begin()).x());
+ nextX = (std::min)(nextX, (*crossQueue_.begin()).x());
             }
             //std::cout << "6\n";
             justBefore_ = true;
@@ -638,7 +638,7 @@
           ++mergeCount;
           ++mergeEnd;
         }
- crossVector_.reserve(std::max(vec.capacity(), vec.size() + mergeCount));
+ crossVector_.reserve((std::max)(vec.capacity(), vec.size() + mergeCount));
         for(unsigned int i = 0; i < vec.size(); ++i){
           while(inputBegin != mergeEnd &&
                 (*inputBegin).first.y() < vec[i].first.y()) {
@@ -767,7 +767,7 @@
         Unit y1 = iter1->evalAtX(x_);
         Unit y2 = iter2->evalAtX(x_);
         LongUnit delta = (LongUnit)abs((LongUnit)y1 - (LongUnit)y2);
- if(delta + x_ <= std::numeric_limits<Unit>::max())
+ if(delta + x_ <= (std::numeric_limits<Unit>::max)())
           crossQueue_.insert(crossQueue_.end(), Point(x_ + delta, y1));
         //std::cout << Point(x_ + delta, y1);
       }
@@ -781,7 +781,7 @@
         //note that half the delta cannot exceed the positive inter range
         LongUnit delta = y1;
         delta -= y2;
- Unit UnitMax = std::numeric_limits<Unit>::max();
+ Unit UnitMax = (std::numeric_limits<Unit>::max)();
         if(delta & 1) {
           //delta is odd, division by 2 will result in integer trunctaion
           if(delta == 1) {

Modified: sandbox/gtl/boost/polygon/gtl_boost_unit_test.cpp
==============================================================================
--- sandbox/gtl/boost/polygon/gtl_boost_unit_test.cpp (original)
+++ sandbox/gtl/boost/polygon/gtl_boost_unit_test.cpp 2009-06-23 19:08:08 EDT (Tue, 23 Jun 2009)
@@ -1,5 +1,13 @@
+/*
+ Copyright 2008 Intel Corporation
+
+ Use, modification and distribution are subject to the Boost Software License,
+ Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+*/
 #define BOOST_POLYGON_NO_DEPS
 #include "polygon.hpp"
+namespace gtl = boost::polygon;
 
 #include <time.h>
 #include <stdlib.h>

Modified: sandbox/gtl/boost/polygon/interval_concept.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/interval_concept.hpp (original)
+++ sandbox/gtl/boost/polygon/interval_concept.hpp 2009-06-23 19:08:08 EDT (Tue, 23 Jun 2009)
@@ -31,7 +31,7 @@
 
   template <typename T>
   struct interval_coordinate_type {
- typedef typename interval_coordinate_type_by_concept<
+ typedef typename interval_coordinate_type_by_concept<
             T, typename is_interval_concept<typename geometry_concept<T>::type>::type>::type type;
   };
 
@@ -43,14 +43,14 @@
 
   template <typename T>
   struct interval_difference_type {
- typedef typename interval_difference_type_by_concept<
+ typedef typename interval_difference_type_by_concept<
             T, typename is_interval_concept<typename geometry_concept<T>::type>::type>::type type;
   };
 
 
   template <typename T>
   typename enable_if<typename gtl_if<typename is_interval_concept<typename geometry_concept<T>::type>::type>::type,
- typename interval_coordinate_type<T>::type>::type
+ typename interval_coordinate_type<T>::type>::type
   get(const T& interval, direction_1d dir) {
     return interval_traits<T>::get(interval, dir);
   }
@@ -394,8 +394,8 @@
                        bool>::type
   intersect(interval_type& interval, const interval_type_2& b, bool consider_touch = true) {
     typedef typename interval_traits<interval_type>::coordinate_type Unit;
- Unit lowVal = std::max(low(interval), low(b));
- Unit highVal = std::min(high(interval), high(b));
+ Unit lowVal = (std::max)(low(interval), low(b));
+ Unit highVal = (std::min)(high(interval), high(b));
     bool valid = consider_touch ?
       lowVal <= highVal :
       lowVal < highVal;
@@ -466,8 +466,8 @@
     bool>::type
   encompass(interval_type& interval, const interval_type_2& b) {
     bool retval = !contains(interval, b, true);
- low(interval, std::min(low(interval), low(b)));
- high(interval, std::max(high(interval), high(b)));
+ low(interval, (std::min)(low(interval), low(b)));
+ high(interval, (std::max)(high(interval), high(b)));
     return retval;
   }
 
@@ -477,8 +477,8 @@
                        bool>::type
   encompass(interval_type& interval, typename interval_traits<interval_type>::coordinate_type b) {
     bool retval = !contains(interval, b, true);
- low(interval, std::min(low(interval), b));
- high(interval, std::max(high(interval), b));
+ low(interval, (std::min)(low(interval), b));
+ high(interval, (std::max)(high(interval), b));
     return retval;
   }
 

Modified: sandbox/gtl/boost/polygon/isotropy.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/isotropy.hpp (original)
+++ sandbox/gtl/boost/polygon/isotropy.hpp 2009-06-23 19:08:08 EDT (Tue, 23 Jun 2009)
@@ -14,8 +14,8 @@
 
 #else
 
- namespace boost {
- template <bool B, class T = void>
+ namespace boost {
+ template <bool B, class T = void>
     struct enable_if_c {
       typedef T type;
     };

Modified: sandbox/gtl/boost/polygon/point_3d_concept.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/point_3d_concept.hpp (original)
+++ sandbox/gtl/boost/polygon/point_3d_concept.hpp 2009-06-23 19:08:08 EDT (Tue, 23 Jun 2009)
@@ -29,7 +29,7 @@
 
   template <typename T>
   struct point_3d_coordinate_type {
- typedef typename point_3d_coordinate_type_by_concept<T, typename is_point_3d_concept<typename geometry_concept<T>::type>::type>::type type;
+ typedef typename point_3d_coordinate_type_by_concept<T, typename is_point_3d_concept<typename geometry_concept<T>::type>::type>::type type;
   };
 
   template <typename T, typename CT>
@@ -40,7 +40,7 @@
 
   template <typename T>
   struct point_3d_difference_type {
- typedef typename point_3d_difference_type_by_concept<
+ typedef typename point_3d_difference_type_by_concept<
             T, typename is_point_3d_concept<typename geometry_concept<T>::type>::type>::type type;
   };
 

Modified: sandbox/gtl/boost/polygon/point_concept.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/point_concept.hpp (original)
+++ sandbox/gtl/boost/polygon/point_concept.hpp 2009-06-23 19:08:08 EDT (Tue, 23 Jun 2009)
@@ -35,7 +35,7 @@
 
   template <typename T>
   struct point_coordinate_type {
- typedef typename point_coordinate_type_by_concept<T, typename is_point_concept<typename geometry_concept<T>::type>::type>::type type;
+ typedef typename point_coordinate_type_by_concept<T, typename is_point_concept<typename geometry_concept<T>::type>::type>::type type;
   };
 
   template <typename T, typename CT>
@@ -46,7 +46,7 @@
 
   template <typename T>
   struct point_difference_type {
- typedef typename point_difference_type_by_concept<
+ typedef typename point_difference_type_by_concept<
             T, typename is_point_concept<typename geometry_concept<T>::type>::type>::type type;
   };
 
@@ -58,13 +58,13 @@
 
   template <typename T>
   struct point_distance_type {
- typedef typename point_distance_type_by_concept<
+ typedef typename point_distance_type_by_concept<
             T, typename is_point_concept<typename geometry_concept<T>::type>::type>::type type;
   };
 
   template <typename T>
   typename enable_if< typename gtl_if<typename is_point_concept<typename geometry_concept<T>::type>::type>::type,
- typename point_coordinate_type<T>::type >::type
+ typename point_coordinate_type<T>::type >::type
   get(const T& point, orientation_2d orient) {
     return point_traits<T>::get(point, orient);
   }

Modified: sandbox/gtl/boost/polygon/polygon.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/polygon.hpp (original)
+++ sandbox/gtl/boost/polygon/polygon.hpp 2009-06-23 19:08:08 EDT (Tue, 23 Jun 2009)
@@ -5,11 +5,11 @@
   Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
   http://www.boost.org/LICENSE_1_0.txt).
 */
-#ifndef GTL_GTL_HPP
-#define GTL_GTL_HPP
+#ifndef GTL_POLYGON_HPP
+#define GTL_POLYGON_HPP
 
 //external
-#include <math.h>
+#include <cmath>
 #include <vector>
 #include <deque>
 #include <map>
@@ -21,24 +21,10 @@
 #include <iterator>
 #include <string>
 
-#ifdef __ICC
-#pragma warning (disable:1125)
+#ifndef BOOST_POLYGON_NO_DEPS
+#include <boost/config.hpp>
 #endif
 
-#ifdef WIN32
-#pragma warning( disable: 4996 )
-#pragma warning( disable: 4800 )
-#ifdef max
-#undef max
-#endif
-#ifdef min
-#undef min
-#endif
-#endif
-
-namespace boost { namespace polygon {}}
-namespace gtl = boost::polygon;
-
 #include "isotropy.hpp"
 
 //point
@@ -296,7 +282,4 @@
 /// @}
 //
 
-#if __ICC
-#pragma warning (default:1125)
-#endif
 #endif

Modified: sandbox/gtl/boost/polygon/polygon_45_formation.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/polygon_45_formation.hpp (original)
+++ sandbox/gtl/boost/polygon/polygon_45_formation.hpp 2009-06-23 19:08:08 EDT (Tue, 23 Jun 2009)
@@ -522,16 +522,16 @@
       int justBefore_;
       int fractureHoles_;
     public:
- inline Polygon45Formation() : scanData_(), x_((std::numeric_limits<Unit>::min())), justBefore_(false), fractureHoles_(0) {
+ inline Polygon45Formation() : scanData_(), x_((std::numeric_limits<Unit>::min)()), justBefore_(false), fractureHoles_(0) {
         lessVertex45 lessElm(&x_, &justBefore_);
         scanData_ = Polygon45FormationData(lessElm);
       }
- inline Polygon45Formation(bool fractureHoles) : scanData_(), x_((std::numeric_limits<Unit>::min())), justBefore_(false), fractureHoles_(fractureHoles) {
+ inline Polygon45Formation(bool fractureHoles) : scanData_(), x_((std::numeric_limits<Unit>::min)()), justBefore_(false), fractureHoles_(fractureHoles) {
         lessVertex45 lessElm(&x_, &justBefore_);
         scanData_ = Polygon45FormationData(lessElm);
       }
       inline Polygon45Formation(const Polygon45Formation& that) :
- scanData_(), x_((std::numeric_limits<Unit>::min())), justBefore_(false), fractureHoles_(0) { (*this) = that; }
+ scanData_(), x_((std::numeric_limits<Unit>::min)()), justBefore_(false), fractureHoles_(0) { (*this) = that; }
       inline Polygon45Formation& operator=(const Polygon45Formation& that) {
         x_ = that.x_;
         justBefore_ = that.justBefore_;
@@ -1233,12 +1233,12 @@
       Unit x_;
       int justBefore_;
     public:
- inline Polygon45Tiling() : scanData_(), x_((std::numeric_limits<Unit>::min())), justBefore_(false) {
+ inline Polygon45Tiling() : scanData_(), x_((std::numeric_limits<Unit>::min)()), justBefore_(false) {
         lessVertex45 lessElm(&x_, &justBefore_);
         scanData_ = Polygon45FormationData(lessElm);
       }
       inline Polygon45Tiling(const Polygon45Tiling& that) :
- scanData_(), x_((std::numeric_limits<Unit>::min())), justBefore_(false) { (*this) = that; }
+ scanData_(), x_((std::numeric_limits<Unit>::min)()), justBefore_(false) { (*this) = that; }
       inline Polygon45Tiling& operator=(const Polygon45Tiling& that) {
         x_ = that.x_;
         justBefore_ = that.justBefore_;

Modified: sandbox/gtl/boost/polygon/polygon_45_set_data.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/polygon_45_set_data.hpp (original)
+++ sandbox/gtl/boost/polygon/polygon_45_set_data.hpp 2009-06-23 19:08:08 EDT (Tue, 23 Jun 2009)
@@ -260,7 +260,7 @@
         cT result;
         ps.get_trapezoids(result);
         for(typename cT::iterator itr = result.begin(); itr != result.end(); ++itr) {
- ::gtl::transform(*itr, axis_transformation(axis_transformation::SWAP_XY));
+ ::boost::polygon::transform(*itr, axis_transformation(axis_transformation::SWAP_XY));
         }
         container.insert(container.end(), result.begin(), result.end());
       }
@@ -592,8 +592,8 @@
     if(empty()) {
       return false;
     }
- Unit low = std::numeric_limits<Unit>::max();
- Unit high = std::numeric_limits<Unit>::min();
+ Unit low = (std::numeric_limits<Unit>::max)();
+ Unit high = (std::numeric_limits<Unit>::min)();
     interval_data<Unit> xivl(low, high);
     interval_data<Unit> yivl(low, high);
     for(typename value_type::const_iterator itr = data_.begin();
@@ -1117,7 +1117,7 @@
     get(polys);
     for(typename std::vector<polygon_45_with_holes_data<Unit> >::iterator itr = polys.begin();
         itr != polys.end(); ++itr) {
- gtl::transform(*itr, tr);
+ ::boost::polygon::transform(*itr, tr);
     }
     clear();
     insert(polys.begin(), polys.end());
@@ -1139,7 +1139,7 @@
     get_polygons_with_holes(polys);
     for(typename std::vector<polygon_45_with_holes_data<Unit> >::iterator itr = polys.begin();
         itr != polys.end(); ++itr) {
- gtl::scale_down(*itr, factor);
+ ::boost::polygon::scale_down(*itr, factor);
     }
     clear();
     insert(polys.begin(), polys.end());
@@ -1155,7 +1155,7 @@
     get_polygons_with_holes(polys);
     for(typename std::vector<polygon_45_with_holes_data<Unit> >::iterator itr = polys.begin();
         itr != polys.end(); ++itr) {
- gtl::scale(*itr, factor);
+ ::boost::polygon::scale(*itr, factor);
     }
     clear();
     insert(polys.begin(), polys.end());
@@ -1203,12 +1203,12 @@
     typename value_type::const_iterator iter2 = rvalue_data.begin();
     typename value_type::const_iterator end1 = lvalue_data.end();
     typename value_type::const_iterator end2 = rvalue_data.end();
- const Unit2 UnitMax = std::numeric_limits<Unit2>::max();
+ const Unit2 UnitMax = (std::numeric_limits<Unit2>::max)();
     Unit2 x = UnitMax;
     while(iter1 != end1 || iter2 != end2) {
       Unit2 currentX = UnitMax;
       if(iter1 != end1) currentX = iter1->pt.x();
- if(iter2 != end2) currentX = std::min(currentX, iter2->pt.x());
+ if(iter2 != end2) currentX = (std::min)(currentX, iter2->pt.x());
       if(currentX != x) {
         //std::cout << "SCAN " << currentX << "\n";
         //scan event
@@ -1328,7 +1328,7 @@
     typedef std::vector<typename polygon_45_formation<Unit2>::Vertex45Compact> value_type;
     typename value_type::const_iterator iter1 = lvalue_data.begin();
     typename value_type::const_iterator end1 = lvalue_data.end();
- const Unit2 UnitMax = std::numeric_limits<Unit2>::max();
+ const Unit2 UnitMax = (std::numeric_limits<Unit2>::max)();
     Unit2 x = UnitMax;
     while(iter1 != end1) {
       Unit2 currentX = iter1->pt.x();

Modified: sandbox/gtl/boost/polygon/polygon_45_touch.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/polygon_45_touch.hpp (original)
+++ sandbox/gtl/boost/polygon/polygon_45_touch.hpp 2009-06-23 19:08:08 EDT (Tue, 23 Jun 2009)
@@ -200,7 +200,7 @@
         itr = itr2;
       }
       std::pair<std::pair<Unit, std::map<Unit, std::set<int> > >, graph_type*> output
- (std::make_pair(std::make_pair(std::numeric_limits<Unit>::max(), std::map<Unit, std::set<int> >()), &graph));
+ (std::make_pair(std::make_pair((std::numeric_limits<Unit>::max)(), std::map<Unit, std::set<int> >()), &graph));
       typename boolean_op_45<Unit>::template Scan45<CountTouch, touch_45_output_functor> scanline;
       for(typename TSD::iterator itr = tsd_.begin(); itr != tsd_.end(); ) {
         typename TSD::iterator itr2 = itr;

Modified: sandbox/gtl/boost/polygon/polygon_90_set_data.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/polygon_90_set_data.hpp (original)
+++ sandbox/gtl/boost/polygon/polygon_90_set_data.hpp 2009-06-23 19:08:08 EDT (Tue, 23 Jun 2009)
@@ -165,7 +165,7 @@
         output_container result;
         ps.get_rectangles(result);
         for(typename output_container::iterator itr = result.begin(); itr != result.end(); ++itr) {
- ::gtl::transform(*itr, axis_transformation(axis_transformation::SWAP_XY));
+ ::boost::polygon::transform(*itr, axis_transformation(axis_transformation::SWAP_XY));
         }
         output.insert(output.end(), result.begin(), result.end());
       }
@@ -306,7 +306,7 @@
            typename coordinate_traits<coordinate_type>::unsigned_area_type north_shrinking) {
       rectangle_data<coordinate_type> externalBoundary;
       if(!extents(externalBoundary)) return *this;
- ::gtl::bloat(externalBoundary, 10); //bloat by diferential ammount
+ ::boost::polygon::bloat(externalBoundary, 10); //bloat by diferential ammount
       //insert a hole that encompasses the data
       insert(externalBoundary, true); //note that the set is in a dirty state now
       sort(); //does not apply implicit OR operation
@@ -438,7 +438,7 @@
     polygon_90_set_data& self_intersect() {
       sort();
       if(dirty_) { //if it is clean it is a no-op
- interval_data<coordinate_type> ivl(std::numeric_limits<coordinate_type>::min(), std::numeric_limits<coordinate_type>::max());
+ interval_data<coordinate_type> ivl((std::numeric_limits<coordinate_type>::min)(), (std::numeric_limits<coordinate_type>::max)());
         rectangle_data<coordinate_type> rect(ivl, ivl);
         insert(rect, true);
         clean();
@@ -518,7 +518,7 @@
     template <typename output_container, typename concept_type>
     void get_fracture(output_container& container, bool fracture_holes, concept_type tag) const {
       clean();
- ::gtl::get_polygons(container, data_.begin(), data_.end(), orient_, fracture_holes, tag);
+ ::boost::polygon::get_polygons(container, data_.begin(), data_.end(), orient_, fracture_holes, tag);
     }
   };
 

Modified: sandbox/gtl/boost/polygon/polygon_90_touch.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/polygon_90_touch.hpp (original)
+++ sandbox/gtl/boost/polygon/polygon_90_touch.hpp 2009-06-23 19:08:08 EDT (Tue, 23 Jun 2009)
@@ -383,7 +383,7 @@
 
     template <class iT>
     static inline void populateTouchSetData(TouchSetData& data, iT beginData, iT endData, int id) {
- Unit prevPos = (std::numeric_limits<Unit>::max());
+ Unit prevPos = ((std::numeric_limits<Unit>::max)());
       Unit prevY = prevPos;
       int count = 0;
       for(iT itr = beginData; itr != endData; ++itr) {

Modified: sandbox/gtl/boost/polygon/polygon_arbitrary_formation.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/polygon_arbitrary_formation.hpp (original)
+++ sandbox/gtl/boost/polygon/polygon_arbitrary_formation.hpp 2009-06-23 19:08:08 EDT (Tue, 23 Jun 2009)
@@ -343,7 +343,7 @@
       Rectangle rect1, rect2;
       set_points(rect1, he1.first, he1.second);
       set_points(rect2, he2.first, he2.second);
- if(!::gtl::intersects(rect1, rect2, true)) return false;
+ if(!::boost::polygon::intersects(rect1, rect2, true)) return false;
       if(is_vertical(he1)) {
         if(is_vertical(he2)) return false;
         high_precision y_high = evalAtXforY(he1.first.get(HORIZONTAL), he2.first, he2.second);
@@ -416,7 +416,7 @@
       Rectangle rect1, rect2;
       set_points(rect1, he1.first, he1.second);
       set_points(rect2, he2.first, he2.second);
- if(::gtl::intersects(rect1, rect2, false)) {
+ if(::boost::polygon::intersects(rect1, rect2, false)) {
         if(he1.first == he2.first) {
           if(he1.second != he2.second && equal_slope(he1.first.get(HORIZONTAL), he1.first.get(VERTICAL),
                                                      he1.second, he2.second)) {
@@ -462,10 +462,10 @@
         return true; //they must cross
       }
       if(is_vertical(he1) && is_vertical(he2) && he1.first.get(HORIZONTAL) == he2.first.get(HORIZONTAL))
- return ::gtl::intersects(rect1.get(VERTICAL), rect2.get(VERTICAL), false) &&
+ return ::boost::polygon::intersects(rect1.get(VERTICAL), rect2.get(VERTICAL), false) &&
           rect1.get(VERTICAL) != rect2.get(VERTICAL);
       if(is_horizontal(he1) && is_horizontal(he2) && he1.first.get(VERTICAL) == he2.first.get(VERTICAL))
- return ::gtl::intersects(rect1.get(HORIZONTAL), rect2.get(HORIZONTAL), false) &&
+ return ::boost::polygon::intersects(rect1.get(HORIZONTAL), rect2.get(HORIZONTAL), false) &&
           rect1.get(HORIZONTAL) != rect2.get(HORIZONTAL);
       return false;
     }
@@ -1025,17 +1025,17 @@
     int fractureHoles_;
   public:
     inline polygon_arbitrary_formation() :
- scanData_(), x_(std::numeric_limits<Unit>::min()), justBefore_(false), fractureHoles_(0) {
+ scanData_(), x_((std::numeric_limits<Unit>::min)()), justBefore_(false), fractureHoles_(0) {
       less_vertex_half_edge lessElm(&x_, &justBefore_);
       scanData_ = scanline_data(lessElm);
     }
     inline polygon_arbitrary_formation(bool fractureHoles = false) :
- scanData_(), x_(std::numeric_limits<Unit>::min()), justBefore_(false), fractureHoles_(fractureHoles) {
+ scanData_(), x_((std::numeric_limits<Unit>::min)()), justBefore_(false), fractureHoles_(fractureHoles) {
       less_vertex_half_edge lessElm(&x_, &justBefore_);
       scanData_ = scanline_data(lessElm);
     }
     inline polygon_arbitrary_formation(const polygon_arbitrary_formation& that) :
- scanData_(), x_(std::numeric_limits<Unit>::min()), justBefore_(false), fractureHoles_(0) { (*this) = that; }
+ scanData_(), x_((std::numeric_limits<Unit>::min)()), justBefore_(false), fractureHoles_(0) { (*this) = that; }
     inline polygon_arbitrary_formation& operator=(const polygon_arbitrary_formation& that) {
       x_ = that.x_;
       justBefore_ = that.justBefore_;
@@ -1792,12 +1792,12 @@
       he2.second = Point(1, -10);
       b = compute_intersection(result, he1, he2);
       if(!b || result != Point(0, -5)) return false;
- he1.first = Point(std::numeric_limits<int>::max(), std::numeric_limits<int>::max()-1);
- he1.second = Point(std::numeric_limits<int>::min(), std::numeric_limits<int>::max());
- //he1.second = Point(0, std::numeric_limits<int>::max());
- he2.first = Point(std::numeric_limits<int>::max()-1, std::numeric_limits<int>::max());
- he2.second = Point(std::numeric_limits<int>::max(), std::numeric_limits<int>::min());
- //he2.second = Point(std::numeric_limits<int>::max(), 0);
+ he1.first = Point((std::numeric_limits<int>::max)(), (std::numeric_limits<int>::max)()-1);
+ he1.second = Point((std::numeric_limits<int>::min)(), (std::numeric_limits<int>::max)());
+ //he1.second = Point(0, (std::numeric_limits<int>::max)());
+ he2.first = Point((std::numeric_limits<int>::max)()-1, (std::numeric_limits<int>::max)());
+ he2.second = Point((std::numeric_limits<int>::max)(), (std::numeric_limits<int>::min)());
+ //he2.second = Point((std::numeric_limits<int>::max)(), 0);
       b = compute_intersection(result, he1, he2);
       //b is false because of overflow error
       he1.first = Point(1000, 2000);

Modified: sandbox/gtl/boost/polygon/polygon_data.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/polygon_data.hpp (original)
+++ sandbox/gtl/boost/polygon/polygon_data.hpp 2009-06-23 19:08:08 EDT (Tue, 23 Jun 2009)
@@ -13,13 +13,13 @@
   class polygon_data : public polygon_45_data<T> {
   public:
     typedef polygon_concept geometry_type;
-
+
     inline polygon_data() : polygon_45_data<T>() {} //do nothing default constructor
 
     template<class iT>
     inline polygon_data(iT input_begin, iT input_end) : polygon_45_data<T>(input_begin, input_end) {}
 
- // copy constructor (since we have dynamic memory)
+ // copy constructor (since we have dynamic memory)
     inline polygon_data(const polygon_data& that) : polygon_45_data<T>(that.coords_.begin(), that.coords_.end()) {}
   
     // assignment operator (since we have dynamic memory do a deep copy)

Modified: sandbox/gtl/boost/polygon/polygon_formation.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/polygon_formation.hpp (original)
+++ sandbox/gtl/boost/polygon/polygon_formation.hpp 2009-06-23 19:08:08 EDT (Tue, 23 Jun 2009)
@@ -1534,7 +1534,7 @@
     unsigned int rightIndex = 0;
     bool bottomAlreadyProcessed = false;
     ActiveTail<Unit>* currentTail = 0;
- const Unit UnitMax = std::numeric_limits<Unit>::max();
+ const Unit UnitMax = (std::numeric_limits<Unit>::max)();
     while(leftIndex < leftEdges.size() || rightIndex < rightEdges.size()) {
       interval_data<Unit> edges[2] = {interval_data<Unit> (UnitMax, UnitMax), interval_data<Unit> (UnitMax, UnitMax)};
       bool haveNextEdge = true;
@@ -1729,8 +1729,8 @@
     polygon_formation::ScanLineToPolygonItrs<false, coordinate_type, polygon_concept_type> scanlineToPolygonItrsH(fracture_holes);
     std::vector<interval_data<coordinate_type> > leftEdges;
     std::vector<interval_data<coordinate_type> > rightEdges;
- coordinate_type prevPos = std::numeric_limits<coordinate_type>::max();
- coordinate_type prevY = std::numeric_limits<coordinate_type>::max();
+ coordinate_type prevPos = (std::numeric_limits<coordinate_type>::max)();
+ coordinate_type prevY = (std::numeric_limits<coordinate_type>::max)();
     int count = 0;
     for(iterator_type itr = begin;
         itr != end; ++ itr) {

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 2009-06-23 19:08:08 EDT (Tue, 23 Jun 2009)
@@ -287,8 +287,8 @@
     inline polygon_set_data&
     transform(const transform_type& tr) {
       for(typename value_type::iterator itr = data_.begin(); itr != data_.end(); ++itr) {
- ::gtl::transform((*itr).first.first, tr);
- ::gtl::transform((*itr).first.second, tr);
+ ::boost::polygon::transform((*itr).first.first, tr);
+ ::boost::polygon::transform((*itr).first.second, tr);
       }
       unsorted_ = true;
       dirty_ = true;
@@ -298,8 +298,8 @@
     inline polygon_set_data&
     scale_up(typename coordinate_traits<coordinate_type>::unsigned_area_type factor) {
       for(typename value_type::iterator itr = data_.begin(); itr != data_.end(); ++itr) {
- ::gtl::scale_up((*itr).first.first, factor);
- ::gtl::scale_up((*itr).first.second, factor);
+ ::boost::polygon::scale_up((*itr).first.first, factor);
+ ::boost::polygon::scale_up((*itr).first.second, factor);
       }
       return *this;
     }
@@ -307,8 +307,8 @@
     inline polygon_set_data&
     scale_down(typename coordinate_traits<coordinate_type>::unsigned_area_type factor) {
       for(typename value_type::iterator itr = data_.begin(); itr != data_.end(); ++itr) {
- ::gtl::scale_down((*itr).first.first, factor);
- ::gtl::scale_down((*itr).first.second, factor);
+ ::boost::polygon::scale_down((*itr).first.first, factor);
+ ::boost::polygon::scale_down((*itr).first.second, factor);
       }
       unsorted_ = true;
       dirty_ = true;
@@ -319,8 +319,8 @@
     inline polygon_set_data& scale(polygon_set_data& polygon_set,
                                    const scaling_type& scaling) {
       for(typename value_type::iterator itr = begin(); itr != end(); ++itr) {
- ::gtl::scale((*itr).first.first, scaling);
- ::gtl::scale((*itr).first.second, scaling);
+ ::boost::polygon::scale((*itr).first.first, scaling);
+ ::boost::polygon::scale((*itr).first.second, scaling);
       }
       unsorted_ = true;
       dirty_ = true;

Modified: sandbox/gtl/boost/polygon/polygon_traits.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/polygon_traits.hpp (original)
+++ sandbox/gtl/boost/polygon/polygon_traits.hpp 2009-06-23 19:08:08 EDT (Tue, 23 Jun 2009)
@@ -1255,8 +1255,8 @@
       } else {
         he.second = currentPt;
         if(equivalence(point, currentPt)) return consider_touch;
- Unit xmin = std::min(x(he.first), x(he.second));
- Unit xmax = std::max(x(he.first), x(he.second));
+ Unit xmin = (std::min)(x(he.first), x(he.second));
+ Unit xmax = (std::max)(x(he.first), x(he.second));
         if(x(point) >= xmin && x(point) < xmax) { //double counts if <= xmax
           Point tmppt;
           assign(tmppt, point);

Modified: sandbox/gtl/boost/polygon/rectangle_concept.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/rectangle_concept.hpp (original)
+++ sandbox/gtl/boost/polygon/rectangle_concept.hpp 2009-06-23 19:08:08 EDT (Tue, 23 Jun 2009)
@@ -46,7 +46,7 @@
 
   template <typename T>
   struct rectangle_interval_type {
- typedef typename rectangle_interval_type_by_concept<T, typename is_rectangle_concept<typename geometry_concept<T>::type>::type>::type type;
+ typedef typename rectangle_interval_type_by_concept<T, typename is_rectangle_concept<typename geometry_concept<T>::type>::type>::type type;
   };
 
   template <typename T, typename CT>
@@ -56,7 +56,7 @@
 
   template <typename T>
   struct rectangle_coordinate_type {
- typedef typename rectangle_coordinate_type_by_concept<T, typename is_rectangle_concept<typename geometry_concept<T>::type>::type>::type type;
+ typedef typename rectangle_coordinate_type_by_concept<T, typename is_rectangle_concept<typename geometry_concept<T>::type>::type>::type type;
   };
 
   template <typename T, typename CT>

Modified: sandbox/gtl/boost/polygon/rectangle_formation.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/rectangle_formation.hpp (original)
+++ sandbox/gtl/boost/polygon/rectangle_formation.hpp 2009-06-23 19:08:08 EDT (Tue, 23 Jun 2009)
@@ -31,7 +31,7 @@
       scanData_(orientation_2d(orient.to_int() ? VERTICAL : HORIZONTAL)),
       haveCurrentRect_(false), currentRect_(), orient_(orient), currentCoordinate_() {
       assign(currentRect_, model);
- currentCoordinate_ = std::numeric_limits<coordinate_type>::max();
+ currentCoordinate_ = (std::numeric_limits<coordinate_type>::max)();
     }
     
     template <typename CT>
@@ -146,8 +146,8 @@
                   } else {
                     //extend the top of current rect
                     currentRect.set(orient.get_direction(HIGH),
- std::max(edge.get(HIGH),
- tmpRect.get(orient.get_direction(HIGH))));
+ (std::max)(edge.get(HIGH),
+ tmpRect.get(orient.get_direction(HIGH))));
                   }
                 } else {
                   //insert current rect into the scanData
@@ -155,18 +155,18 @@
                   //create a new current rect
                   currentRect.set(orient.get_perpendicular(), interval_data<coordinate_type>(currentCoordinate,
                                                                       currentCoordinate));
- currentRect.set(orient, interval_data<coordinate_type>(std::min(tmpRect.get(orient).get(LOW),
+ currentRect.set(orient, interval_data<coordinate_type>((std::min)(tmpRect.get(orient).get(LOW),
                                                        edge.get(LOW)),
- std::max(tmpRect.get(orient).get(HIGH),
+ (std::max)(tmpRect.get(orient).get(HIGH),
                                                        edge.get(HIGH))));
                 }
               } else {
                 haveCurrentRect = true;
                 currentRect.set(orient.get_perpendicular(), interval_data<coordinate_type>(currentCoordinate,
                                                                     currentCoordinate));
- currentRect.set(orient, interval_data<coordinate_type>(std::min(tmpRect.get(orient).get(LOW),
+ currentRect.set(orient, interval_data<coordinate_type>((std::min)(tmpRect.get(orient).get(LOW),
                                                      edge.get(LOW)),
- std::max(tmpRect.get(orient).get(HIGH),
+ (std::max)(tmpRect.get(orient).get(HIGH),
                                                      edge.get(HIGH))));
               }
               //skip to nextIter position
@@ -244,7 +244,7 @@
     typedef typename output_container::value_type rectangle_type;
     typedef typename get_coordinate_type_for_rectangles<rectangle_type, typename geometry_concept<rectangle_type>::type>::type Unit;
     rectangle_data<Unit> model;
- Unit prevPos = std::numeric_limits<Unit>::max();
+ Unit prevPos = (std::numeric_limits<Unit>::max)();
     rectangle_formation::ScanLineToRects<rectangle_data<Unit> > scanlineToRects(orient, model);
     for(iterator_type itr = begin;
         itr != end; ++ itr) {

Modified: sandbox/gtl/boost/polygon/scan_arbitrary.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/scan_arbitrary.hpp (original)
+++ sandbox/gtl/boost/polygon/scan_arbitrary.hpp 2009-06-23 19:08:08 EDT (Tue, 23 Jun 2009)
@@ -39,7 +39,7 @@
     std::vector<std::pair<half_edge, int> > event_edges_;
     std::set<Point> intersection_queue_;
   public:
- inline line_intersection() : vertical_data_(), edge_scanline_(), x_(std::numeric_limits<Unit>::max()), just_before_(0), segment_id_(0) {
+ inline line_intersection() : vertical_data_(), edge_scanline_(), x_((std::numeric_limits<Unit>::max)()), just_before_(0), segment_id_(0) {
       less_half_edge lessElm(&x_, &just_before_);
       edge_scanline_ = edge_scanline(lessElm);
     }
@@ -88,10 +88,10 @@
             inner != data.end(); ++inner) {
           const half_edge& he2 = (*inner).first;
           if(he1 == he2) continue;
- if(std::min(he2. first.get(HORIZONTAL),
- he2.second.get(HORIZONTAL)) >
- std::max(he1.second.get(HORIZONTAL),
- he1.first.get(HORIZONTAL)))
+ if((std::min)(he2. first.get(HORIZONTAL),
+ he2.second.get(HORIZONTAL)) >
+ (std::max)(he1.second.get(HORIZONTAL),
+ he1.first.get(HORIZONTAL)))
             break;
           Point intersection;
           if(compute_intersection(intersection, he1, he2)) {
@@ -108,10 +108,10 @@
         typedef rectangle_data<Unit> Rectangle;
         Rectangle rect1;
         set_points(rect1, he1.first, he1.second);
- typename std::set<Point>::iterator itr = pts.lower_bound(std::min(he1.first, he1.second));
- typename std::set<Point>::iterator itr2 = pts.upper_bound(std::max(he1.first, he1.second));
- while(itr != pts.end() && itr != pts.begin() && (*itr).get(HORIZONTAL) >= std::min(he1.first.get(HORIZONTAL), he1.second.get(HORIZONTAL))) --itr;
- while(itr2 != pts.end() && (*itr2).get(HORIZONTAL) <= std::max(he1.first.get(HORIZONTAL), he1.second.get(HORIZONTAL))) ++itr2;
+ typename std::set<Point>::iterator itr = pts.lower_bound((std::min)(he1.first, he1.second));
+ typename std::set<Point>::iterator itr2 = pts.upper_bound((std::max)(he1.first, he1.second));
+ while(itr != pts.end() && itr != pts.begin() && (*itr).get(HORIZONTAL) >= (std::min)(he1.first.get(HORIZONTAL), he1.second.get(HORIZONTAL))) --itr;
+ while(itr2 != pts.end() && (*itr2).get(HORIZONTAL) <= (std::max)(he1.first.get(HORIZONTAL), he1.second.get(HORIZONTAL))) ++itr2;
         //itr = pts.begin();
         //itr2 = pts.end();
         for( ; itr != itr2; ++itr) {
@@ -180,10 +180,10 @@
             inner != data.end(); ++inner) {
           const half_edge& he2 = (*inner).first;
           if(he1 == he2) continue;
- if(std::min(he2. first.get(HORIZONTAL),
- he2.second.get(HORIZONTAL)) >
- std::max(he1.second.get(HORIZONTAL),
- he1.first.get(HORIZONTAL)))
+ if((std::min)(he2. first.get(HORIZONTAL),
+ he2.second.get(HORIZONTAL)) >
+ (std::max)(he1.second.get(HORIZONTAL),
+ he1.first.get(HORIZONTAL)))
             break;
           segment_id id2 = (*inner).second;
           if(scanline_base<Unit>::intersects(he1, he2)) {
@@ -337,7 +337,7 @@
         Unit y = pt.get(VERTICAL);
         intersection_locations.insert(y);
         //if x_ is max there can be only end events and no sloping edges
- if(x_ != std::numeric_limits<Unit>::max()) {
+ if(x_ != (std::numeric_limits<Unit>::max)()) {
           //deal with edges that project to the right of scanline
           //first find the edges in the scanline adjacent to primary intersectin points
           //lookup segment in scanline at pt
@@ -368,7 +368,7 @@
           update_segments(intersection_points, (*inter_iter).second, Point(x_, (*inter_iter).first.get(VERTICAL)));
         } else {
           //if x_ is max there can be only end events and no sloping edges
- if(x_ != std::numeric_limits<Unit>::max()) {
+ if(x_ != (std::numeric_limits<Unit>::max)()) {
             //insert its end points into the vector of sloping ends
             const half_edge& he = (*inter_iter).first;
             Unit y = evalAtXforY(x_, he.first, he.second);
@@ -457,7 +457,7 @@
 
       //process end events by removing those segments from the scanline
       //and insert vertices of all events into intersection queue
- Point prev_point(std::numeric_limits<Unit>::min(), std::numeric_limits<Unit>::min());
+ Point prev_point((std::numeric_limits<Unit>::min)(), (std::numeric_limits<Unit>::min)());
       less_point lp;
       std::set<segment_id> vertical_ids;
       vertical_data_.clear();
@@ -865,12 +865,12 @@
     int just_before_;
   public:
     inline scanline() : scan_data_(), removal_set_(), insertion_set_(), end_point_queue_(),
- x_(std::numeric_limits<Unit>::max()), y_(std::numeric_limits<Unit>::max()), just_before_(false) {
+ x_((std::numeric_limits<Unit>::max)()), y_((std::numeric_limits<Unit>::max)()), just_before_(false) {
       less_half_edge lessElm(&x_, &just_before_);
       scan_data_ = scanline_type(lessElm);
     }
     inline scanline(const scanline& that) : scan_data_(), removal_set_(), insertion_set_(), end_point_queue_(),
- x_(std::numeric_limits<Unit>::max()), y_(std::numeric_limits<Unit>::max()), just_before_(false) {
+ x_((std::numeric_limits<Unit>::max)()), y_((std::numeric_limits<Unit>::max)()), just_before_(false) {
       (*this) = that; }
     inline scanline& operator=(const scanline& that) {
       x_ = that.x_;
@@ -911,7 +911,7 @@
       //current_iter should increase monotonically toward end as we process scanline stop
       iterator current_iter = scan_data_.begin();
       just_before_ = true;
- high_precision y = (high_precision)(std::numeric_limits<Unit>::min());
+ high_precision y = (high_precision)((std::numeric_limits<Unit>::min)());
       bool first_iteration = true;
       //we want to return from inside the loop when we hit end or new x
       while(true) {
@@ -926,7 +926,7 @@
             //make sure we are looking at element in scanline just below y
             if(evalAtXforY(x_, (*current_iter).first.first, (*current_iter).first.second) != y) {
               Point e2(pt);
- if(e2.get(VERTICAL) != std::numeric_limits<Unit>::max())
+ if(e2.get(VERTICAL) != (std::numeric_limits<Unit>::max)())
                 e2.set(VERTICAL, e2.get(VERTICAL) + 1);
               else
                 e2.set(VERTICAL, e2.get(VERTICAL) - 1);
@@ -1038,7 +1038,7 @@
         previous_x = x_;
         //lookup elements
         Point e2(*epqi);
- if(e2.get(VERTICAL) != std::numeric_limits<Unit>::max())
+ if(e2.get(VERTICAL) != (std::numeric_limits<Unit>::max)())
           e2.set(VERTICAL, e2.get(VERTICAL) + 1);
         else
           e2.set(VERTICAL, e2.get(VERTICAL) - 1);
@@ -1081,7 +1081,7 @@
         insert_new_edges_into_scanline();
       }
       //print_scanline();
- x_ = std::numeric_limits<Unit>::max();
+ x_ = (std::numeric_limits<Unit>::max)();
       remove_retired_edges_from_scanline();
     }
 


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