[thin_show_dups] get the backup break working in the rolling hash

This commit is contained in:
Joe Thornber
2015-09-04 10:10:41 +01:00
parent 750ce0f47b
commit 5d383c0293
3 changed files with 8 additions and 37 deletions

View File

@@ -82,7 +82,6 @@ content_based_hash::reset()
optional<unsigned>
content_based_hash::step(uint8_t byte)
{
#if 0
optional<unsigned> r;
rhash_.step(byte);
@@ -114,28 +113,6 @@ content_based_hash::step(uint8_t byte)
}
return r;
#else
optional<unsigned> r;
rhash_.step(byte);
len_++;
if (len_ < min_len_)
return r;
if (hit_break(div_)) {
// found a break
r = len_;
len_ = 0;
backup_break_.reset();
} else if (len_ >= max_len_) {
r = len_;
len_ = 0;
}
return r;
#endif
}
bool