[damage_tracker] Reset the tracker in the end() method so we can reuse it.

The *_check tools already reuse trackers.

Patch from Ming-Hung Tsai.
This commit is contained in:
Joe Thornber
2015-05-26 12:49:27 +01:00
parent 85d1701ba1
commit 880785a9bf
2 changed files with 20 additions and 2 deletions

View File

@ -70,10 +70,17 @@ namespace persistent_data {
}
maybe_run64 end() {
maybe_run64 r;
if (damaged_)
return maybe_run64(damage_begin_);
r = maybe_run64(damage_begin_);
else
return maybe_run64();
r = maybe_run64();
damaged_ = false;
damage_begin_ = 0;
return r;
}
private: