[Lemon-commits] [lemon_svn] klao: r598 - hugo/trunk/src/work/klao

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


Author: klao
Date: Wed Apr 28 00:29:11 2004
New Revision: 598

Modified:
   hugo/trunk/src/work/klao/path.h

Log:
trifles

Modified: hugo/trunk/src/work/klao/path.h
==============================================================================
--- hugo/trunk/src/work/klao/path.h	(original)
+++ hugo/trunk/src/work/klao/path.h	Wed Apr 28 00:29:11 2004
@@ -585,7 +585,7 @@
   template<typename Gr>
   typename DynamicPath<Gr>::EdgeIt&
   DynamicPath<Gr>::nth(EdgeIt &e, size_t k) const {
-    if( k<0 || k>=length() ) {
+    if( k>=length() ) {
       // FIXME: invalid EdgeIt
       e.it = edges.end();
       e.forw = true;
@@ -606,7 +606,7 @@
   template<typename Gr>
   typename DynamicPath<Gr>::NodeIt&
   DynamicPath<Gr>::nth(NodeIt &n, size_t k) const {
-    if( k<0 || k>length() ) {
+    if( k>length() ) {
       // FIXME: invalid NodeIt
       n.idx = length()+1;
       n.tail = true;
@@ -649,7 +649,7 @@
 
     int ai = a.idx, bi = b.idx;
     if( bi<ai )
-      swap(ai,bi);
+      std::swap(ai,bi);
     
     edges.resize(bi-ai);
     copy(P.edges.begin()+ai, P.edges.begin()+bi, edges.begin());



More information about the Lemon-commits mailing list