Commit eb0730c9 authored by Christopher Dykes's avatar Christopher Dykes Committed by Facebook Github Bot

Use long long for the 64-bit fingerprint table

Summary: Because these are always 64-bit values. This hasn't actually been an issue but is the correct thing to do.

Reviewed By: yfeldblum

Differential Revision: D5425658

fbshipit-source-id: 5bc204b3d1af2c710bd8b1665211d2971ccf7be7
parent d63e7a1b
......@@ -89,7 +89,7 @@ void computeTables(FILE* file, const FingerprintPolynomial<DEG>& poly) {
"const uint64_t FingerprintTable<%d>::poly[%d] = {",
DEG+1, FingerprintPolynomial<DEG>::size()));
for (int j = 0; j < FingerprintPolynomial<DEG>::size(); j++) {
CHECK_ERR(fprintf(file, "%s%" PRIu64 "LU", j ? ", " : "", poly_val[j]));
CHECK_ERR(fprintf(file, "%s%" PRIu64 "LLU", j ? ", " : "", poly_val[j]));
}
CHECK_ERR(fprintf(file, "};\n\n"));
......@@ -106,8 +106,8 @@ void computeTables(FILE* file, const FingerprintPolynomial<DEG>& poly) {
for (int x = 0; x < 256; x++) {
CHECK_ERR(fprintf(file, " {"));
for (int j = 0; j < FingerprintPolynomial<DEG>::size(); j++) {
CHECK_ERR(fprintf(
file, "%s%" PRIu64 "LU", (j ? ", " : ""), table[i][x][j]));
CHECK_ERR(
fprintf(file, "%s%" PRIu64 "LLU", (j ? ", " : ""), table[i][x][j]));
}
CHECK_ERR(fprintf(file, "},\n"));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment