From 47a656c0b6fdba8f91f2c5808234cbb1de682652 Mon Sep 17 00:00:00 2001 From: redpony Date: Wed, 10 Nov 2010 02:02:04 +0000 Subject: new version of klm git-svn-id: https://ws10smt.googlecode.com/svn/trunk@706 ec762483-ff6d-05da-a07a-a48fb63a330f --- klm/util/ersatz_progress.hh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'klm/util/ersatz_progress.hh') diff --git a/klm/util/ersatz_progress.hh b/klm/util/ersatz_progress.hh index ea6c3bb9..92c345fe 100644 --- a/klm/util/ersatz_progress.hh +++ b/klm/util/ersatz_progress.hh @@ -19,7 +19,7 @@ class ErsatzProgress { ~ErsatzProgress(); ErsatzProgress &operator++() { - if (++current_ == next_) Milestone(); + if (++current_ >= next_) Milestone(); return *this; } @@ -33,6 +33,10 @@ class ErsatzProgress { Milestone(); } + void Finished() { + Set(complete_); + } + private: void Milestone(); -- cgit v1.2.3