summaryrefslogtreecommitdiff
path: root/klm/util/ersatz_progress.hh
diff options
context:
space:
mode:
authorredpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-11-10 02:02:04 +0000
committerredpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-11-10 02:02:04 +0000
commit47a656c0b6fdba8f91f2c5808234cbb1de682652 (patch)
tree638e1e9226ef6dc403b752b98d9fadb56f74c69e /klm/util/ersatz_progress.hh
parent0c83a47353733c85814871a9a656cafdc70e6800 (diff)
new version of klm
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@706 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'klm/util/ersatz_progress.hh')
-rw-r--r--klm/util/ersatz_progress.hh6
1 files changed, 5 insertions, 1 deletions
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();