diff options
| author | David Chisnall <theraven@FreeBSD.org> | 2012-03-13 14:09:15 +0000 |
|---|---|---|
| committer | David Chisnall <theraven@FreeBSD.org> | 2012-03-13 14:09:15 +0000 |
| commit | 362d815b81e2b4b66c33b99203d821b8928607e1 (patch) | |
| tree | 491848d33dbdf1751fd52f321d3fbf70a8e616f2 /src/hash.cpp | |
| parent | 1828c5696f7bf5850943ea6c660a493a5e648669 (diff) | |
Notes
Diffstat (limited to 'src/hash.cpp')
| -rw-r--r-- | src/hash.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hash.cpp b/src/hash.cpp index 728b9bd3831b3..6f30d5a60581b 100644 --- a/src/hash.cpp +++ b/src/hash.cpp @@ -181,7 +181,8 @@ __next_prime(size_t n) // Select first potential prime >= n // Known a-priori n >= L size_t k0 = n / L; - size_t in = std::lower_bound(indices, indices + M, n - k0 * L) - indices; + size_t in = static_cast<size_t>(std::lower_bound(indices, indices + M, n - k0 * L) + - indices); n = L * k0 + indices[in]; while (true) { |
