Made 'shift' constexpr, of constexpr variables.

Credits to, Code Analyzer of Visual Studio 2022.
This commit is contained in:
Muhammad Ammar 2023-07-04 16:51:56 +05:00 committed by GitHub
parent de4705f84d
commit d6144a1adf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2821,7 +2821,7 @@ class bigint {
FMT_CONSTEXPR20 void multiply(UInt value) {
using half_uint =
conditional_t<std::is_same<UInt, uint128_t>::value, uint64_t, uint32_t>;
const int shift = num_bits<half_uint>() - bigit_bits;
constexpr int shift = num_bits<half_uint>() - bigit_bits;
const UInt lower = static_cast<half_uint>(value);
const UInt upper = value >> num_bits<half_uint>();
UInt carry = 0;