# HG changeset patch # User Peter Kovacs # Date 2008-06-14 19:52:08 # Node ID 8ceb318224b18d21c969ca15f98b31ced37aa0b5 # Parent d57ae6f0a335ba6ee61d0f1e4fd7f11460318268 Remove reset() functions from SubCounter classes (ticket #82) diff --git a/lemon/counter.h b/lemon/counter.h --- a/lemon/counter.h +++ b/lemon/counter.h @@ -59,7 +59,6 @@ int operator--(int) { return count--; } _SubCounter &operator+=(int c) { count+=c; return *this;} _SubCounter &operator-=(int c) { count-=c; return *this;} - void reset(int c=0) {count=c;} operator int() {return count;} }; @@ -87,8 +86,6 @@ int operator--(int) { _parent--; return 0;} _NoSubCounter &operator+=(int c) { _parent+=c; return *this;} _NoSubCounter &operator-=(int c) { _parent-=c; return *this;} - void reset(int) {} - void reset() {} operator int() {return 0;} }; @@ -203,6 +200,11 @@ ///\e Counter &operator-=(int c) { count-=c; return *this;} /// Resets the counter to the given value. + + /// Resets the counter to the given value. + /// \note This function does not reset the values of + /// \ref SubCounter "SubCounter"s but it resets \ref NoSubCounter + /// "NoSubCounter"s along with the main counter. void reset(int c=0) {count=c;} /// Returns the value of the counter. operator int() {return count;}