Fix -Wsign-conversion in bigint::assign.

num_bigits is initialised to 0, is only ever incremented, and is passed to basic_memory_buffer::operator[] (size_t) and basic_memory_buffer::resize (size_t).
This commit is contained in:
Dair Grant 2020-03-01 00:46:11 +00:00
parent 572ddf43b5
commit 2cf8f35178

View File

@ -578,7 +578,7 @@ class bigint {
} }
void assign(uint64_t n) { void assign(uint64_t n) {
int num_bigits = 0; size_t num_bigits = 0;
do { do {
bigits_[num_bigits++] = n & ~bigit(0); bigits_[num_bigits++] = n & ~bigit(0);
n >>= bigit_bits; n >>= bigit_bits;