Improved checksum algorithm to fix configurations being purged by coincidence (#6126):
- Better distribution of values by rotating the bits of the checksum for each token
This commit is contained in:
parent
270f59e76a
commit
e4a81f9666
|
@ -410,6 +410,11 @@ unsigned long long TokenList::calculateChecksum() const
|
||||||
}
|
}
|
||||||
|
|
||||||
checksum ^= ((static_cast<unsigned long long>(subchecksum1) << 32) | subchecksum2);
|
checksum ^= ((static_cast<unsigned long long>(subchecksum1) << 32) | subchecksum2);
|
||||||
|
|
||||||
|
bool bit1 = (checksum & 1) != 0;
|
||||||
|
checksum >>= 1;
|
||||||
|
if (bit1)
|
||||||
|
checksum |= (1ULL << 63);
|
||||||
}
|
}
|
||||||
return checksum;
|
return checksum;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue