Fix the error when compiled using vs2013

The error message for the original codes is: unary minus operator applied to unsigned type, result still unsigned. Added static casting to eliminate this message.
This commit is contained in:
blackball 2015-07-24 16:19:08 +02:00
parent 1eaf180cda
commit fc50f103a6

View File

@ -101,7 +101,7 @@ inline void DigitGen(const DiyFp& W, const DiyFp& Mp, uint64_t delta, char* buff
kappa--;
if (p2 < delta) {
*K += kappa;
GrisuRound(buffer, *len, delta, p2, one.f, wp_w.f * kPow10[-kappa]);
GrisuRound(buffer, *len, delta, p2, one.f, wp_w.f * kPow10[-static_cast<int>(kappa)]);
return;
}
}