aboutsummaryrefslogtreecommitdiffstats
path: root/libtests/bits.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2013-02-24 03:46:21 +0100
committerJay Berkenbilt <ejb@ql.org>2013-03-04 22:45:16 +0100
commit30027481f7f9e9191f7c8deea51850b7a76b1b1f (patch)
tree815af293c2f6e38994e6096a4499be0dc9a476f9 /libtests/bits.cc
parentbabb47948a408ebad12c452ba3fdd78782360167 (diff)
downloadqpdf-30027481f7f9e9191f7c8deea51850b7a76b1b1f.tar.zst
Remove all old-style casts from C++ code
Diffstat (limited to 'libtests/bits.cc')
-rw-r--r--libtests/bits.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/libtests/bits.cc b/libtests/bits.cc
index 7837ac68..c14bceb6 100644
--- a/libtests/bits.cc
+++ b/libtests/bits.cc
@@ -37,7 +37,8 @@ test_write_bits(unsigned char& ch, unsigned int& bit_offset, unsigned long val,
int bits, Pl_Buffer* bp)
{
write_bits(ch, bit_offset, val, bits, bp);
- printf("ch = %02x, bit_offset = %d\n", (unsigned int) ch, bit_offset);
+ printf("ch = %02x, bit_offset = %d\n",
+ static_cast<unsigned int>(ch), bit_offset);
}
static void
@@ -49,7 +50,7 @@ print_buffer(Pl_Buffer* bp)
size_t l = b->getSize();
for (unsigned long i = 0; i < l; ++i)
{
- printf("%02x%s", (unsigned int)(p[i]),
+ printf("%02x%s", static_cast<unsigned int>(p[i]),
(i == l - 1) ? "\n" : " ");
}
printf("\n");