Fix -Wsign-conversion in bigint::subtract_aligned.
n is assigned a size_t, and only used for comparisons with j. j is assigned 0, compared to n (size_t), and passed to basic_memory_buffer::operator[] (size_t).
This commit is contained in:
parent
bed134a4aa
commit
572ddf43b5
@ -526,7 +526,7 @@ class bigint {
|
|||||||
FMT_ASSERT(compare(*this, other) >= 0, "");
|
FMT_ASSERT(compare(*this, other) >= 0, "");
|
||||||
bigit borrow = 0;
|
bigit borrow = 0;
|
||||||
int i = other.exp_ - exp_;
|
int i = other.exp_ - exp_;
|
||||||
for (int j = 0, n = static_cast<int>(other.bigits_.size()); j != n;
|
for (size_t j = 0, n = other.bigits_.size(); j != n;
|
||||||
++i, ++j) {
|
++i, ++j) {
|
||||||
subtract_bigits(i, other.bigits_[j], borrow);
|
subtract_bigits(i, other.bigits_[j], borrow);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user