summaryrefslogtreecommitdiffstats
path: root/src/hash.cpp
diff options
context:
space:
mode:
authortheraven <theraven@FreeBSD.org>2012-03-13 14:09:15 +0000
committertheraven <theraven@FreeBSD.org>2012-03-13 14:09:15 +0000
commitbaa75b9984d33ea49ffb76a73507b64d879166cc (patch)
tree491848d33dbdf1751fd52f321d3fbf70a8e616f2 /src/hash.cpp
parentd8f28ec8a2faabad3aabb9f7a26755971424ef05 (diff)
downloadFreeBSD-src-baa75b9984d33ea49ffb76a73507b64d879166cc.zip
FreeBSD-src-baa75b9984d33ea49ffb76a73507b64d879166cc.tar.gz
Import new version of libc++ into vendor branch.
Approved by: dim (mentor)
Diffstat (limited to 'src/hash.cpp')
-rw-r--r--src/hash.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hash.cpp b/src/hash.cpp
index 728b9bd..6f30d5a 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)
{
OpenPOWER on IntegriCloud