1
0
Fork 0

fixed Visual Studio compile warnings

This commit is contained in:
Jan Steemann 2015-02-25 09:23:42 +01:00
parent c8089f9747
commit ff8cd454fa
2 changed files with 3 additions and 3 deletions

View File

@ -139,7 +139,7 @@ static int generate_digits(Fp* fp, Fp* upper, Fp* lower, char* digits, int* K)
for(divp = tens + 10; kappa > 0; divp++) {
uint64_t div = *divp;
unsigned digit = part1 / div;
unsigned digit = static_cast<unsigned>(part1 / div);
if (digit || idx) {
digits[idx++] = digit + '0';
@ -165,7 +165,7 @@ static int generate_digits(Fp* fp, Fp* upper, Fp* lower, char* digits, int* K)
delta *= 10;
kappa--;
unsigned digit = part2 >> -one.exp;
unsigned digit = static_cast<unsigned>(part2 >> -one.exp);
if (digit || idx) {
digits[idx++] = digit + '0';
}

View File

@ -64,7 +64,7 @@ static Fp find_cachedpow10(int exp, int* k)
{
const double one_log_ten = 0.30102999566398114;
int approx = -(exp + npowers) * one_log_ten;
int approx = static_cast<int>(-(exp + npowers) * one_log_ten);
int idx = (approx - firstpower) / steppowers;
while(1) {