Remove reset() functions from SubCounter classes (ticket #82)
authorPeter Kovacs <kpeter@inf.elte.hu>
Sat, 14 Jun 2008 19:52:08 +0200
changeset 1688ceb318224b1
parent 167 d57ae6f0a335
child 169 5b507a86ad72
Remove reset() functions from SubCounter classes (ticket #82)
lemon/counter.h
     1.1 --- a/lemon/counter.h	Sat Jun 14 19:34:15 2008 +0200
     1.2 +++ b/lemon/counter.h	Sat Jun 14 19:52:08 2008 +0200
     1.3 @@ -59,7 +59,6 @@
     1.4      int operator--(int) { return count--; }
     1.5      _SubCounter &operator+=(int c) { count+=c; return *this;}
     1.6      _SubCounter &operator-=(int c) { count-=c; return *this;}
     1.7 -    void reset(int c=0) {count=c;}
     1.8      operator int() {return count;}
     1.9    };
    1.10  
    1.11 @@ -87,8 +86,6 @@
    1.12      int operator--(int) { _parent--; return 0;}
    1.13      _NoSubCounter &operator+=(int c) { _parent+=c; return *this;}
    1.14      _NoSubCounter &operator-=(int c) { _parent-=c; return *this;}
    1.15 -    void reset(int) {}
    1.16 -    void reset() {}
    1.17      operator int() {return 0;}
    1.18    };
    1.19  
    1.20 @@ -203,6 +200,11 @@
    1.21      ///\e
    1.22      Counter &operator-=(int c) { count-=c; return *this;}
    1.23      /// Resets the counter to the given value.
    1.24 +
    1.25 +    /// Resets the counter to the given value.
    1.26 +    /// \note This function does not reset the values of
    1.27 +    /// \ref SubCounter "SubCounter"s but it resets \ref NoSubCounter
    1.28 +    /// "NoSubCounter"s along with the main counter. 
    1.29      void reset(int c=0) {count=c;}
    1.30      /// Returns the value of the counter.
    1.31      operator int() {return count;}