# 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
|
|
59 | 59 | int operator--(int) { return count--; } |
60 | 60 | _SubCounter &operator+=(int c) { count+=c; return *this;} |
61 | 61 | _SubCounter &operator-=(int c) { count-=c; return *this;} |
62 | | void reset(int c=0) {count=c;} |
63 | 62 | operator int() {return count;} |
64 | 63 | }; |
65 | 64 | |
… |
… |
|
87 | 86 | int operator--(int) { _parent--; return 0;} |
88 | 87 | _NoSubCounter &operator+=(int c) { _parent+=c; return *this;} |
89 | 88 | _NoSubCounter &operator-=(int c) { _parent-=c; return *this;} |
90 | | void reset(int) {} |
91 | | void reset() {} |
92 | 89 | operator int() {return 0;} |
93 | 90 | }; |
94 | 91 | |
… |
… |
|
203 | 200 | ///\e |
204 | 201 | Counter &operator-=(int c) { count-=c; return *this;} |
205 | 202 | /// 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. |
206 | 208 | void reset(int c=0) {count=c;} |
207 | 209 | /// Returns the value of the counter. |
208 | 210 | operator int() {return count;} |