diff options
Diffstat (limited to 'src/lib/math/numbertheory')
-rw-r--r-- | src/lib/math/numbertheory/make_prm.cpp | 2 | ||||
-rw-r--r-- | src/lib/math/numbertheory/numthry.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/math/numbertheory/make_prm.cpp b/src/lib/math/numbertheory/make_prm.cpp index 3d82adf06..acd187063 100644 --- a/src/lib/math/numbertheory/make_prm.cpp +++ b/src/lib/math/numbertheory/make_prm.cpp @@ -66,7 +66,7 @@ BigInt random_prime(RandomNumberGenerator& rng, secure_vector<u16bit> sieve(sieve_size); for(size_t j = 0; j != sieve.size(); ++j) - sieve[j] = p % PRIMES[j]; + sieve[j] = static_cast<u16bit>(p % PRIMES[j]); size_t counter = 0; while(true) diff --git a/src/lib/math/numbertheory/numthry.cpp b/src/lib/math/numbertheory/numthry.cpp index ae2d33524..6c3d2c931 100644 --- a/src/lib/math/numbertheory/numthry.cpp +++ b/src/lib/math/numbertheory/numthry.cpp @@ -446,7 +446,7 @@ bool is_prime(const BigInt& n, RandomNumberGenerator& rng, // Fast path testing for small numbers (<= 65521) if(n <= PRIMES[PRIME_TABLE_SIZE-1]) { - const u16bit num = n.word_at(0); + const u16bit num = static_cast<u16bit>(n.word_at(0)); return std::binary_search(PRIMES, PRIMES + PRIME_TABLE_SIZE, num); } |