Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r83349 - in trunk: boost/polygon boost/polygon/detail libs/polygon/test
From: sydorchuk.andriy_at_[hidden]
Date: 2013-03-07 15:42:36


Author: asydorchuk
Date: 2013-03-07 15:42:35 EST (Thu, 07 Mar 2013)
New Revision: 83349
URL: http://svn.boost.org/trac/boost/changeset/83349

Log:
Polygon: fixing ticket #8257 (#pragma warning default in polygon).
Text files modified:
   trunk/boost/polygon/detail/boolean_op_45.hpp | 6 ++++--
   trunk/boost/polygon/detail/polygon_45_set_view.hpp | 9 ++++++---
   trunk/boost/polygon/detail/polygon_set_view.hpp | 3 ++-
   trunk/boost/polygon/detail/scan_arbitrary.hpp | 11 +++++++----
   trunk/boost/polygon/gtl.hpp | 12 ++++++++++--
   trunk/boost/polygon/polygon_45_set_data.hpp | 6 ++++--
   trunk/boost/polygon/polygon_traits.hpp | 3 ++-
   trunk/libs/polygon/test/gtl_boost_unit_test.cpp | 4 ++--
   8 files changed, 37 insertions(+), 17 deletions(-)

Modified: trunk/boost/polygon/detail/boolean_op_45.hpp
==============================================================================
--- trunk/boost/polygon/detail/boolean_op_45.hpp (original)
+++ trunk/boost/polygon/detail/boolean_op_45.hpp 2013-03-07 15:42:35 EST (Thu, 07 Mar 2013)
@@ -370,6 +370,7 @@
     template <int op>
     static bool applyLogic(Count2 count) {
 #ifdef BOOST_POLYGON_MSVC
+#pragma warning (push)
 #pragma warning (disable: 4127)
 #endif
       if(op == 0) { //apply or
@@ -383,7 +384,7 @@
       } else
         return false;
 #ifdef BOOST_POLYGON_MSVC
-#pragma warning (default: 4127)
+#pragma warning (pop)
 #endif
     }
 
@@ -405,6 +406,7 @@
     template <int op>
     static bool applyLogic(Count1 count) {
 #ifdef BOOST_POLYGON_MSVC
+#pragma warning (push)
 #pragma warning (disable: 4127)
 #endif
       if(op == 0) { //apply or
@@ -416,7 +418,7 @@
       } else
         return false;
 #ifdef BOOST_POLYGON_MSVC
-#pragma warning (default: 4127)
+#pragma warning (pop)
 #endif
     }
 

Modified: trunk/boost/polygon/detail/polygon_45_set_view.hpp
==============================================================================
--- trunk/boost/polygon/detail/polygon_45_set_view.hpp (original)
+++ trunk/boost/polygon/detail/polygon_45_set_view.hpp 2013-03-07 15:42:35 EST (Thu, 07 Mar 2013)
@@ -39,6 +39,7 @@
       rinput_.set(polygon_45_set_traits<rtype>::begin(rvalue_),
                   polygon_45_set_traits<rtype>::end(rvalue_));
 #ifdef BOOST_POLYGON_MSVC
+#pragma warning (push)
 #pragma warning (disable: 4127)
 #endif
       if(op_type == 0)
@@ -50,7 +51,7 @@
       else
         output_ -= rinput_;
 #ifdef BOOST_POLYGON_MSVC
-#pragma warning (default: 4127)
+#pragma warning (pop)
 #endif
     }
   };
@@ -62,6 +63,7 @@
       output_.set(polygon_45_set_traits<ltype>::begin(lvalue_),
                   polygon_45_set_traits<ltype>::end(lvalue_));
 #ifdef BOOST_POLYGON_MSVC
+#pragma warning (push)
 #pragma warning (disable: 4127)
 #endif
       if(op_type == 0)
@@ -73,7 +75,7 @@
       else
         output_ -= rvalue_;
 #ifdef BOOST_POLYGON_MSVC
-#pragma warning (default: 4127)
+#pragma warning (pop)
 #endif
     }
   };
@@ -153,6 +155,7 @@
     rinput_.set(polygon_45_set_traits<rtype>::begin(rvalue_),
                 polygon_45_set_traits<rtype>::end(rvalue_));
 #ifdef BOOST_POLYGON_MSVC
+#pragma warning (push)
 #pragma warning (disable: 4127)
 #endif
     if(op_type == 0)
@@ -164,7 +167,7 @@
     else
       output_ -= rinput_;
 #ifdef BOOST_POLYGON_MSVC
-#pragma warning (default: 4127)
+#pragma warning (pop)
 #endif
     polygon_45_set_mutable_traits<geometry_type_1>::set(lvalue_, output_.begin(), output_.end());
     return lvalue_;

Modified: trunk/boost/polygon/detail/polygon_set_view.hpp
==============================================================================
--- trunk/boost/polygon/detail/polygon_set_view.hpp (original)
+++ trunk/boost/polygon/detail/polygon_set_view.hpp 2013-03-07 15:42:35 EST (Thu, 07 Mar 2013)
@@ -102,6 +102,7 @@
 // if(linput_.downcast(l45) && rinput_.downcast(r45)) {
 // //the op codes are screwed up between 45 and arbitrary
 //#ifdef BOOST_POLYGON_MSVC
+//#pragma warning (push)
 //#pragma warning (disable: 4127)
 //#endif
 // if(op_type < 2)
@@ -111,7 +112,7 @@
 // else
 // l45.template applyAdaptiveBoolean_<2>(o45, r45);
 //#ifdef BOOST_POLYGON_MSVC
-//#pragma warning (default: 4127)
+//#pragma warning (pop)
 //#endif
 // output_.insert(o45);
 // } else {

Modified: trunk/boost/polygon/detail/scan_arbitrary.hpp
==============================================================================
--- trunk/boost/polygon/detail/scan_arbitrary.hpp (original)
+++ trunk/boost/polygon/detail/scan_arbitrary.hpp 2013-03-07 15:42:35 EST (Thu, 07 Mar 2013)
@@ -1038,7 +1038,8 @@
       bool first_iteration = true;
       //we want to return from inside the loop when we hit end or new x
 #ifdef BOOST_POLYGON_MSVC
-#pragma warning( disable: 4127 )
+#pragma warning (push)
+#pragma warning (disable: 4127)
 #endif
       while(true) {
         if(begin == end || (!first_iteration && ((*begin).first.first.get(VERTICAL) != y ||
@@ -1146,7 +1147,7 @@
         }
       }
 #ifdef BOOST_POLYGON_MSVC
-#pragma warning( default: 4127 )
+#pragma warning (pop)
 #endif
 
     }
@@ -2292,11 +2293,12 @@
             stdcout << polys[j] << "\n";
             stdcout << polys90[j] << "\n";
 #ifdef BOOST_POLYGON_ICC
+#pragma warning (push)
 #pragma warning (disable:1572)
 #endif
             if(area(polys[j]) != area(polys90[j])) {
 #ifdef BOOST_POLYGON_ICC
-#pragma warning (default:1572)
+#pragma warning (pop)
 #endif
               stdcout << "merge failed with area mismatch\n";
               failed = true;
@@ -2539,6 +2541,7 @@
         if(edge.second < edge.first) elem.second *= -1;
         if(scanline_base<Unit>::is_vertical(edge)) elem.second *= -1;
 #ifdef BOOST_POLYGON_MSVC
+#pragma warning (push)
 #pragma warning (disable: 4127)
 #endif
         if(op_type == 0) { //OR
@@ -2569,7 +2572,7 @@
             }
           }
 #ifdef BOOST_POLYGON_MSVC
-#pragma warning (default: 4127)
+#pragma warning (pop)
 #endif
           if(right.size() == 1) {
             if((*(right.begin())) == 0) {

Modified: trunk/boost/polygon/gtl.hpp
==============================================================================
--- trunk/boost/polygon/gtl.hpp (original)
+++ trunk/boost/polygon/gtl.hpp 2013-03-07 15:42:35 EST (Thu, 07 Mar 2013)
@@ -9,10 +9,12 @@
 #define GTL_GTL_HPP
 
 #ifdef __ICC
+#pragma warning (push)
 #pragma warning (disable:1125)
 #endif
 
 #ifdef WIN32
+#pragma warning (push)
 #pragma warning( disable: 4996 )
 #pragma warning( disable: 4800 )
 #endif
@@ -21,7 +23,13 @@
 #include "polygon.hpp"
 namespace gtl = boost::polygon;
 using namespace boost::polygon::operators;
-#if __ICC
-#pragma warning (default:1125)
+
+#ifdef WIN32
+#pragma warning (pop)
+#endif
+
+#ifdef __ICC
+#pragma warning (pop)
 #endif
+
 #endif

Modified: trunk/boost/polygon/polygon_45_set_data.hpp
==============================================================================
--- trunk/boost/polygon/polygon_45_set_data.hpp (original)
+++ trunk/boost/polygon/polygon_45_set_data.hpp 2013-03-07 15:42:35 EST (Thu, 07 Mar 2013)
@@ -1551,6 +1551,7 @@
       l90sd.sort();
       r90sd.sort();
 #ifdef BOOST_POLYGON_MSVC
+#pragma warning (push)
 #pragma warning (disable: 4127)
 #endif
       if(op == 0) {
@@ -1567,7 +1568,7 @@
                                     r90sd.begin(), r90sd.end(), boolean_op::BinaryCount<boolean_op::BinaryXor>());
       }
 #ifdef BOOST_POLYGON_MSVC
-#pragma warning (default: 4127)
+#pragma warning (pop)
 #endif
       result.data_.clear();
       result.insert(output);
@@ -1678,6 +1679,7 @@
       }
       l90sd.sort();
 #ifdef BOOST_POLYGON_MSVC
+#pragma warning (push)
 #pragma warning (disable: 4127)
 #endif
       if(op == 0) {
@@ -1688,7 +1690,7 @@
         l90sd.self_xor();
       }
 #ifdef BOOST_POLYGON_MSVC
-#pragma warning (default: 4127)
+#pragma warning (pop)
 #endif
       result.data_.clear();
       result.insert(l90sd);

Modified: trunk/boost/polygon/polygon_traits.hpp
==============================================================================
--- trunk/boost/polygon/polygon_traits.hpp (original)
+++ trunk/boost/polygon/polygon_traits.hpp 2013-03-07 15:42:35 EST (Thu, 07 Mar 2013)
@@ -985,11 +985,12 @@
       area_type x1 = (area_type)x(previous);
       area_type x2 = (area_type)x(*begin_range);
 #ifdef BOOST_POLYGON_ICC
+#pragma warning (push)
 #pragma warning (disable:1572)
 #endif
       if(x1 != x2) {
 #ifdef BOOST_POLYGON_ICC
-#pragma warning (default:1572)
+#pragma warning (pop)
 #endif
         // do trapezoid area accumulation
         area += (x2 - x1) * (((area_type)y(*begin_range) - y_base) +

Modified: trunk/libs/polygon/test/gtl_boost_unit_test.cpp
==============================================================================
--- trunk/libs/polygon/test/gtl_boost_unit_test.cpp (original)
+++ trunk/libs/polygon/test/gtl_boost_unit_test.cpp 2013-03-07 15:42:35 EST (Thu, 07 Mar 2013)
@@ -3565,7 +3565,7 @@
     }
   }
 
- if (1) {
+ {
     using namespace boost::polygon;
     typedef point_data<int> Point;
     typedef segment_data<int> Dls;
@@ -3604,7 +3604,7 @@
     assert_s(dlss.size() == 11, "intersection2");
   }
   
- if (1) {
+ {
     using namespace boost::polygon;
     std::vector<std::pair<std::size_t, segment_data<int> > > segs;
     segment_data<int> sarray[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