diff options
author | Jack Lloyd <[email protected]> | 2019-12-06 11:05:16 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2019-12-06 11:11:56 -0500 |
commit | bbc71ebaa1573290f38273ca80b563d272c0917c (patch) | |
tree | 33e5a0eecb8db399b259d19283e3c8364cd27e02 /src/lib/math | |
parent | 9f3dbac2eb28906e53808682222aef4eb90f4c15 (diff) |
Fix MSVC "optimization" warning about bool conversions
Diffstat (limited to 'src/lib/math')
-rw-r--r-- | src/lib/math/numbertheory/numthry.cpp | 2 | ||||
-rw-r--r-- | src/lib/math/numbertheory/primality.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/math/numbertheory/numthry.cpp b/src/lib/math/numbertheory/numthry.cpp index 0d21f0237..90f1279b6 100644 --- a/src/lib/math/numbertheory/numthry.cpp +++ b/src/lib/math/numbertheory/numthry.cpp @@ -93,7 +93,7 @@ BigInt gcd(const BigInt& a, const BigInt& b) f.shrink_to_fit(); sub_abs(newg, f, g); - const uint8_t need_swap = (g.is_odd() && delta > 0); + const bool need_swap = (g.is_odd() && delta > 0); // if(need_swap) delta *= -1 delta *= CT::Mask<uint8_t>::expand(need_swap).select(0, 2) - 1; diff --git a/src/lib/math/numbertheory/primality.cpp b/src/lib/math/numbertheory/primality.cpp index 5e683c1ff..028e2a7ef 100644 --- a/src/lib/math/numbertheory/primality.cpp +++ b/src/lib/math/numbertheory/primality.cpp @@ -62,7 +62,7 @@ bool is_lucas_probable_prime(const BigInt& C, const Modular_Reducer& mod_C) for(size_t i = 0; i != K_bits; ++i) { - const uint8_t k_bit = K.get_bit(K_bits - 1 - i); + const bool k_bit = K.get_bit(K_bits - 1 - i); Ut = mod_C.multiply(U, V); |