COIN-OR::LEMON - Graph Library

Changeset 1282:81e89e2b90d1 in lemon-0.x for src/lemon


Ignore:
Timestamp:
03/31/05 15:30:27 (19 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1714
Message:

length() returns int istead of size_t

Location:
src/lemon
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/lemon/concept/path.h

    r1270 r1282  
    5858
    5959      /// Length of the path.
    60       size_t length() const {return 0;}
     60      int length() const {return 0;}
    6161      /// Returns whether the path is empty.
    6262      bool empty() const { return true;}
  • src/lemon/path.h

    r1228 r1282  
    103103
    104104    /// Length of the path.
    105     size_t length() const { return edges.size(); }
     105    int length() const { return edges.size(); }
    106106    /// Returns whether the path is empty.
    107107    bool empty() const { return edges.empty(); }
     
    198198
    199199    private:
    200       // FIXME: comparison between signed and unsigned...
    201       // Jo ez igy? Vagy esetleg legyen a length() int?
    202       void validate() { if( size_t(idx) >= p->length() ) idx=-1; }
     200      void validate() { if(idx >= p->length() ) idx=-1; }
    203201    };
    204202
     
    248246
    249247    private:
    250       void validate() { if( size_t(idx) > p->length() ) idx=-1; }
     248      void validate() { if(idx > p->length() ) idx=-1; }
    251249    };
    252250
Note: See TracChangeset for help on using the changeset viewer.