|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r62987 - trunk/boost/polygon
From: lucanus.j.simonson_at_[hidden]
Date: 2010-06-15 13:37:24
Author: ljsimons
Date: 2010-06-15 13:37:23 EDT (Tue, 15 Jun 2010)
New Revision: 62987
URL: http://svn.boost.org/trac/boost/changeset/62987
Log:
fix for signed unsigned comparison warning and hard coding of int for coordinate type in new resizing algorithms
Text files modified:
trunk/boost/polygon/polygon_90_set_data.hpp | 26 +++++++++++++-------------
trunk/boost/polygon/polygon_set_data.hpp | 24 ++++++++++++------------
2 files changed, 25 insertions(+), 25 deletions(-)
Modified: trunk/boost/polygon/polygon_90_set_data.hpp
==============================================================================
--- trunk/boost/polygon/polygon_90_set_data.hpp (original)
+++ trunk/boost/polygon/polygon_90_set_data.hpp 2010-06-15 13:37:23 EDT (Tue, 15 Jun 2010)
@@ -387,17 +387,17 @@
coordinate_type east_bloating,
coordinate_type south_bloating,
coordinate_type north_bloating) {
- point_data<int> first_pt = poly[0];
- point_data<int> second_pt = poly[1];
- point_data<int> prev_pt = poly[0];
- point_data<int> current_pt = poly[1];
- for(int i = 2; i < poly.size(); ++i) {
- point_data<int> next_pt = poly[i];
+ point_data<coordinate_type> first_pt = poly[0];
+ point_data<coordinate_type> second_pt = poly[1];
+ point_data<coordinate_type> prev_pt = poly[0];
+ point_data<coordinate_type> current_pt = poly[1];
+ for(std::size_t i = 2; i < poly.size(); ++i) {
+ point_data<coordinate_type> next_pt = poly[i];
modify_pt(poly[i-1], prev_pt, current_pt, next_pt, west_bloating, east_bloating, south_bloating, north_bloating);
prev_pt = current_pt;
current_pt = next_pt;
}
- point_data<int> next_pt = first_pt;
+ point_data<coordinate_type> next_pt = first_pt;
modify_pt(poly.back(), prev_pt, current_pt, next_pt, west_bloating, east_bloating, south_bloating, north_bloating);
prev_pt = current_pt;
current_pt = next_pt;
@@ -412,13 +412,13 @@
coordinate_type north_shrinking) {
rectangle_data<coordinate_type> extents_rectangle;
set_points(extents_rectangle, poly[0], poly[0]);
- point_data<int> first_pt = poly[0];
- point_data<int> second_pt = poly[1];
- point_data<int> prev_pt = poly[0];
- point_data<int> current_pt = poly[1];
+ point_data<coordinate_type> first_pt = poly[0];
+ point_data<coordinate_type> second_pt = poly[1];
+ point_data<coordinate_type> prev_pt = poly[0];
+ point_data<coordinate_type> current_pt = poly[1];
encompass(extents_rectangle, current_pt);
for(int i = 2; i < poly.size(); ++i) {
- point_data<int> next_pt = poly[i];
+ point_data<coordinate_type> next_pt = poly[i];
encompass(extents_rectangle, next_pt);
modify_pt(poly[i-1], prev_pt, current_pt, next_pt, west_shrinking, east_shrinking, south_shrinking, north_shrinking);
prev_pt = current_pt;
@@ -428,7 +428,7 @@
return false;
if(delta(extents_rectangle, VERTICAL) < std::abs(north_shrinking + south_shrinking))
return false;
- point_data<int> next_pt = first_pt;
+ point_data<coordinate_type> next_pt = first_pt;
modify_pt(poly.back(), prev_pt, current_pt, next_pt, west_shrinking, east_shrinking, south_shrinking, north_shrinking);
prev_pt = current_pt;
current_pt = next_pt;
Modified: trunk/boost/polygon/polygon_set_data.hpp
==============================================================================
--- trunk/boost/polygon/polygon_set_data.hpp (original)
+++ trunk/boost/polygon/polygon_set_data.hpp 2010-06-15 13:37:23 EDT (Tue, 15 Jun 2010)
@@ -459,17 +459,17 @@
}
static void resize_poly_up(std::vector<point_data<coordinate_type> >& poly, coordinate_type distance, coordinate_type multiplier) {
- point_data<int> first_pt = poly[0];
- point_data<int> second_pt = poly[1];
- point_data<int> prev_pt = poly[0];
- point_data<int> current_pt = poly[1];
+ point_data<coordinate_type> first_pt = poly[0];
+ point_data<coordinate_type> second_pt = poly[1];
+ point_data<coordinate_type> prev_pt = poly[0];
+ point_data<coordinate_type> current_pt = poly[1];
for(std::size_t i = 2; i < poly.size()-1; ++i) {
- point_data<int> next_pt = poly[i];
+ point_data<coordinate_type> next_pt = poly[i];
modify_pt(poly[i-1], prev_pt, current_pt, next_pt, distance, multiplier);
prev_pt = current_pt;
current_pt = next_pt;
}
- point_data<int> next_pt = first_pt;
+ point_data<coordinate_type> next_pt = first_pt;
modify_pt(poly[poly.size()-2], prev_pt, current_pt, next_pt, distance, multiplier);
prev_pt = current_pt;
current_pt = next_pt;
@@ -481,13 +481,13 @@
std::vector<point_data<coordinate_type> > orig_poly(poly);
rectangle_data<coordinate_type> extents_rectangle;
set_points(extents_rectangle, poly[0], poly[0]);
- point_data<int> first_pt = poly[0];
- point_data<int> second_pt = poly[1];
- point_data<int> prev_pt = poly[0];
- point_data<int> current_pt = poly[1];
+ point_data<coordinate_type> first_pt = poly[0];
+ point_data<coordinate_type> second_pt = poly[1];
+ point_data<coordinate_type> prev_pt = poly[0];
+ point_data<coordinate_type> current_pt = poly[1];
encompass(extents_rectangle, current_pt);
for(std::size_t i = 2; i < poly.size()-1; ++i) {
- point_data<int> next_pt = poly[i];
+ point_data<coordinate_type> next_pt = poly[i];
encompass(extents_rectangle, next_pt);
modify_pt(poly[i-1], prev_pt, current_pt, next_pt, distance, multiplier);
prev_pt = current_pt;
@@ -497,7 +497,7 @@
return false;
if(delta(extents_rectangle, VERTICAL) <= std::abs(2*distance))
return false;
- point_data<int> next_pt = first_pt;
+ point_data<coordinate_type> next_pt = first_pt;
modify_pt(poly[poly.size()-2], prev_pt, current_pt, next_pt, distance, multiplier);
prev_pt = current_pt;
current_pt = next_pt;
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