1.1 --- a/src/work/klao/path.h Tue Apr 27 18:33:39 2004 +0000
1.2 +++ b/src/work/klao/path.h Tue Apr 27 22:29:11 2004 +0000
1.3 @@ -585,7 +585,7 @@
1.4 template<typename Gr>
1.5 typename DynamicPath<Gr>::EdgeIt&
1.6 DynamicPath<Gr>::nth(EdgeIt &e, size_t k) const {
1.7 - if( k<0 || k>=length() ) {
1.8 + if( k>=length() ) {
1.9 // FIXME: invalid EdgeIt
1.10 e.it = edges.end();
1.11 e.forw = true;
1.12 @@ -606,7 +606,7 @@
1.13 template<typename Gr>
1.14 typename DynamicPath<Gr>::NodeIt&
1.15 DynamicPath<Gr>::nth(NodeIt &n, size_t k) const {
1.16 - if( k<0 || k>length() ) {
1.17 + if( k>length() ) {
1.18 // FIXME: invalid NodeIt
1.19 n.idx = length()+1;
1.20 n.tail = true;
1.21 @@ -649,7 +649,7 @@
1.22
1.23 int ai = a.idx, bi = b.idx;
1.24 if( bi<ai )
1.25 - swap(ai,bi);
1.26 + std::swap(ai,bi);
1.27
1.28 edges.resize(bi-ai);
1.29 copy(P.edges.begin()+ai, P.edges.begin()+bi, edges.begin());