summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/double-conversion/double-conversion/bignum.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/double-conversion/double-conversion/bignum.cc')
-rw-r--r--src/3rdparty/double-conversion/double-conversion/bignum.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/3rdparty/double-conversion/double-conversion/bignum.cc b/src/3rdparty/double-conversion/double-conversion/bignum.cc
index d6745d755a..5c74d70d3d 100644
--- a/src/3rdparty/double-conversion/double-conversion/bignum.cc
+++ b/src/3rdparty/double-conversion/double-conversion/bignum.cc
@@ -147,7 +147,7 @@ void Bignum::AssignHexString(Vector<const char> value) {
}
if (tmp > 0) {
DOUBLE_CONVERSION_ASSERT(tmp <= kBigitMask);
- RawBigit(used_bigits_++) = (tmp & kBigitMask);
+ RawBigit(used_bigits_++) = static_cast<Bignum::Chunk>(tmp & kBigitMask);
}
Clamp();
}
@@ -204,7 +204,7 @@ void Bignum::AddBignum(const Bignum& other) {
carry = sum >> kBigitSize;
++bigit_pos;
}
- used_bigits_ = (std::max)(bigit_pos, static_cast<int>(used_bigits_));
+ used_bigits_ = static_cast<int16_t>(std::max(bigit_pos, static_cast<int>(used_bigits_)));
DOUBLE_CONVERSION_ASSERT(IsClamped());
}
@@ -240,7 +240,7 @@ void Bignum::ShiftLeft(const int shift_amount) {
if (used_bigits_ == 0) {
return;
}
- exponent_ += (shift_amount / kBigitSize);
+ exponent_ += static_cast<int16_t>(shift_amount / kBigitSize);
const int local_shift = shift_amount % kBigitSize;
EnsureCapacity(used_bigits_ + 1);
BigitsShiftLeft(local_shift);
@@ -418,7 +418,7 @@ void Bignum::Square() {
DOUBLE_CONVERSION_ASSERT(accumulator == 0);
// Don't forget to update the used_digits and the exponent.
- used_bigits_ = product_length;
+ used_bigits_ = static_cast<int16_t>(product_length);
exponent_ *= 2;
Clamp();
}
@@ -739,8 +739,8 @@ void Bignum::Align(const Bignum& other) {
for (int i = 0; i < zero_bigits; ++i) {
RawBigit(i) = 0;
}
- used_bigits_ += zero_bigits;
- exponent_ -= zero_bigits;
+ used_bigits_ += static_cast<int16_t>(zero_bigits);
+ exponent_ -= static_cast<int16_t>(zero_bigits);
DOUBLE_CONVERSION_ASSERT(used_bigits_ >= 0);
DOUBLE_CONVERSION_ASSERT(exponent_ >= 0);