Imported Upstream version 1.57.0
[platform/upstream/boost.git] / boost / geometry / views / detail / points_view.hpp
index 91fbc41..a060842 100644 (file)
@@ -36,6 +36,7 @@ class points_view
     // to have it lightweight). Probably there is already an
     // equivalent of this within Boost. If so, TODO: use that one.
     // This used to be "box_iterator" and "segment_iterator".
+    // ALTERNATIVE: use boost:array and its iterators
     struct points_iterator
         : public boost::iterator_facade
             <
@@ -47,21 +48,21 @@ class points_view
         // Constructor: Begin iterator
         inline points_iterator(Point const* p)
             : m_points(p)
-            , m_index(0) 
+            , m_index(0)
         {}
 
         // Constructor: End iterator
         inline points_iterator(Point const* p, bool)
             : m_points(p)
-            , m_index(MaxSize) 
+            , m_index(MaxSize)
         {}
 
         // Constructor: default (for Range Concept checking).
         inline points_iterator()
             : m_points(NULL)
-            , m_index(MaxSize) 
+            , m_index(MaxSize)
         {}
-        
+
         typedef std::ptrdiff_t difference_type;
 
     private:
@@ -73,7 +74,7 @@ class points_view
             {
                 return m_points[m_index];
             }
-            
+
             // If it index larger (or smaller) return first point
             // (assuming initialized)
             return m_points[0];
@@ -98,14 +99,14 @@ class points_view
         {
             return other.m_index - this->m_index;
         }
-        
+
         inline void advance(difference_type n)
         {
             m_index += n;
         }
 
         Point const* m_points;
-        int m_index;
+        difference_type m_index;
     };
 
 public :
@@ -127,8 +128,8 @@ protected :
     {
        copy.apply(m_points);
     }
-    
-private :    
+
+private :
     // Copy points here - box might define them otherwise
     Point m_points[MaxSize];
 };