[Lemon-commits] Peter Kovacs: Remove reset() functions from SubC...
Lemon HG
hg at lemon.cs.elte.hu
Sun Jun 15 10:47:08 CEST 2008
details: http://lemon.cs.elte.hu/hg/lemon/rev/8ceb318224b1
changeset: 168:8ceb318224b1
user: Peter Kovacs <kpeter [at] inf.elte.hu>
date: Sat Jun 14 19:52:08 2008 +0200
description:
Remove reset() functions from SubCounter classes (ticket #82)
diffstat:
1 file changed, 5 insertions(+), 3 deletions(-)
lemon/counter.h | 8 +++++---
diffs (32 lines):
diff -r d57ae6f0a335 -r 8ceb318224b1 lemon/counter.h
--- a/lemon/counter.h Sat Jun 14 19:34:15 2008 +0200
+++ b/lemon/counter.h Sat Jun 14 19:52:08 2008 +0200
@@ -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;}
More information about the Lemon-commits
mailing list