Skip to content

Commit 202158d

Browse files
committed
Use static_cast instead of C-style cast
1 parent b9889e1 commit 202158d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/big-int/bigint.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ BigInt::scan_on (char const *s, onedig_t b)
502502
for (char c = *s; c; c = *++s)
503503
{
504504
// Convert digit. Use 0..9A..Z for singles up to 36. Ignoring case.
505-
c = (char)toupper (c);
505+
c = static_cast<char>(toupper(c));
506506
onedig_t dig;
507507
if (c < '0')
508508
return s;
@@ -585,7 +585,7 @@ BigInt::as_string (char *p, std::size_t l, onedig_t b) const
585585
if (l == 0)
586586
return 0;
587587
onedig_t r = digit_div (dig, len, b);
588-
p[--l] = (char)(r < 10 ? r + '0' : 'A' + r - 10);
588+
p[--l] = static_cast<char>(r < 10 ? r + '0' : 'A' + r - 10);
589589
if (dig[len-1] == 0)
590590
--len;
591591
}

0 commit comments

Comments
 (0)