Skip to content

Commit c7a1826

Browse files
committed
Use static_cast instead of C-style cast
1 parent 297e4c0 commit c7a1826

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/big-int/bigint.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ BigInt::scan_on (char const *s, onedig_t b)
500500
for (char c = *s; c; c = *++s)
501501
{
502502
// Convert digit. Use 0..9A..Z for singles up to 36. Ignoring case.
503-
c = (char)toupper(c);
503+
c = static_cast<char>(toupper(c));
504504
onedig_t dig;
505505
if (c < '0')
506506
return s;
@@ -579,7 +579,7 @@ char *BigInt::as_string(char *p, std::size_t l, onedig_t b) const
579579
if (l == 0)
580580
return 0;
581581
onedig_t r = digit_div (dig, len, b);
582-
p[--l] = (char)(r < 10 ? r + '0' : 'A' + r - 10);
582+
p[--l] = static_cast<char>(r < 10 ? r + '0' : 'A' + r - 10);
583583
if (dig[len-1] == 0)
584584
--len;
585585
}

0 commit comments

Comments
 (0)