[Lemon-commits] [lemon_svn] alpar: r1714 - in hugo/trunk/src/lemon: . concept

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 6 20:47:09 CET 2006


Author: alpar
Date: Thu Mar 31 15:30:27 2005
New Revision: 1714

Modified:
   hugo/trunk/src/lemon/concept/path.h
   hugo/trunk/src/lemon/path.h

Log:
length() returns int istead of size_t

Modified: hugo/trunk/src/lemon/concept/path.h
==============================================================================
--- hugo/trunk/src/lemon/concept/path.h	(original)
+++ hugo/trunk/src/lemon/concept/path.h	Thu Mar 31 15:30:27 2005
@@ -57,7 +57,7 @@
       Path(const Graph &_G) {}
 
       /// Length of the path.
-      size_t length() const {return 0;}
+      int length() const {return 0;}
       /// Returns whether the path is empty.
       bool empty() const { return true;}
 

Modified: hugo/trunk/src/lemon/path.h
==============================================================================
--- hugo/trunk/src/lemon/path.h	(original)
+++ hugo/trunk/src/lemon/path.h	Thu Mar 31 15:30:27 2005
@@ -102,7 +102,7 @@
     }
 
     /// Length of the path.
-    size_t length() const { return edges.size(); }
+    int length() const { return edges.size(); }
     /// Returns whether the path is empty.
     bool empty() const { return edges.empty(); }
 
@@ -197,9 +197,7 @@
       bool operator<(const EdgeIt& e) const { return idx<e.idx; }
 
     private:
-      // FIXME: comparison between signed and unsigned...
-      // Jo ez igy? Vagy esetleg legyen a length() int?
-      void validate() { if( size_t(idx) >= p->length() ) idx=-1; }
+      void validate() { if(idx >= p->length() ) idx=-1; }
     };
 
     /**
@@ -247,7 +245,7 @@
       bool operator<(const NodeIt& e) const { return idx<e.idx; }
 
     private:
-      void validate() { if( size_t(idx) > p->length() ) idx=-1; }
+      void validate() { if(idx > p->length() ) idx=-1; }
     };
 
     friend class Builder;



More information about the Lemon-commits mailing list