Skip to content

Commit

Permalink
Remove useless "lastChecksum" check.
Browse files Browse the repository at this point in the history
  • Loading branch information
jjwhitney committed Feb 7, 2012
1 parent 6d9b1c3 commit d121bf3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/libbdelta.cpp
Expand Up @@ -153,11 +153,10 @@ void findMatches(BDelta_Instance *b, Checksums_Instance *h, unsigned minMatchSiz
*outbuf;
Hash hash = Hash(inbuf, blocksize);
unsigned buf_loc = blocksize;
Hash::Value lastChecksum = ~hash.getValue();
for (unsigned j = start + blocksize; j <= end; ++j) {
unsigned thisTableIndex = h->tableIndex(hash.getValue());
checksum_entry *c = h->htable[thisTableIndex];
if (c && hash.getValue() != lastChecksum) {
if (c) {
do {
if (c->cksum == hash.getValue()) {
unsigned p1 = c->loc, p2 = j - blocksize;
Expand Down Expand Up @@ -188,7 +187,6 @@ void findMatches(BDelta_Instance *b, Checksums_Instance *h, unsigned minMatchSiz
++c;
} while (h->tableIndex(c->cksum) == thisTableIndex);
}
lastChecksum = hash.getValue();

if (bestnum && j >= processMatchesPos) {
addMatch(b, best1, best2, bestnum, iterPlace);
Expand Down

0 comments on commit d121bf3

Please sign in to comment.