COIN-OR::LEMON - Graph Library

Ticket #82: counter-reset.patch

File counter-reset.patch, 1.4 KB (added by Peter Kovacs, 16 years ago)
  • lemon/counter.h

    # HG changeset patch
    # User Peter Kovacs <kpeter@inf.elte.hu>
    # Date 1213465928 -7200
    # Node ID 8ceb318224b18d21c969ca15f98b31ced37aa0b5
    # Parent  d57ae6f0a335ba6ee61d0f1e4fd7f11460318268
    Remove reset() functions from SubCounter classes (ticket #82)
    
    diff -r d57ae6f0a335 -r 8ceb318224b1 lemon/counter.h
    a b  
    5959    int operator--(int) { return count--; }
    6060    _SubCounter &operator+=(int c) { count+=c; return *this;}
    6161    _SubCounter &operator-=(int c) { count-=c; return *this;}
    62     void reset(int c=0) {count=c;}
    6362    operator int() {return count;}
    6463  };
    6564
     
    8786    int operator--(int) { _parent--; return 0;}
    8887    _NoSubCounter &operator+=(int c) { _parent+=c; return *this;}
    8988    _NoSubCounter &operator-=(int c) { _parent-=c; return *this;}
    90     void reset(int) {}
    91     void reset() {}
    9289    operator int() {return 0;}
    9390  };
    9491
     
    203200    ///\e
    204201    Counter &operator-=(int c) { count-=c; return *this;}
    205202    /// Resets the counter to the given value.
     203
     204    /// Resets the counter to the given value.
     205    /// \note This function does not reset the values of
     206    /// \ref SubCounter "SubCounter"s but it resets \ref NoSubCounter
     207    /// "NoSubCounter"s along with the main counter.
    206208    void reset(int c=0) {count=c;}
    207209    /// Returns the value of the counter.
    208210    operator int() {return count;}