aboutsummaryrefslogtreecommitdiffstats
path: root/qpdf/test_large_file.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 /qpdf/test_large_file.cc
parentbabb47948a408ebad12c452ba3fdd78782360167 (diff)
downloadqpdf-30027481f7f9e9191f7c8deea51850b7a76b1b1f.tar.zst
Remove all old-style casts from C++ code
Diffstat (limited to 'qpdf/test_large_file.cc')
-rw-r--r--qpdf/test_large_file.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/qpdf/test_large_file.cc b/qpdf/test_large_file.cc
index f54adb33..7ba5f6cb 100644
--- a/qpdf/test_large_file.cc
+++ b/qpdf/test_large_file.cc
@@ -135,7 +135,7 @@ ImageProvider::provideStreamData(int objid, int generation,
for (int y = 0; y < nstripes; ++y)
{
unsigned char color = get_pixel_color(n, y);
- memset(buf, (int) color, width * stripesize);
+ memset(buf, color, width * stripesize);
pipeline->write(buf, width * stripesize);
}
pipeline->finish();
@@ -256,7 +256,8 @@ static void check_page_contents(int pageno, QPDFObjectHandle page)
PointerHolder<Buffer> buf =
page.getKey("/Contents").getStreamData();
std::string actual_contents =
- std::string((char *)(buf->getBuffer()), buf->getSize());
+ std::string(reinterpret_cast<char *>(buf->getBuffer()),
+ buf->getSize());
std::string expected_contents = generate_page_contents(pageno);
if (expected_contents != actual_contents)
{
@@ -280,7 +281,7 @@ static void check_pdf(char const* filename)
QPDF pdf;
pdf.processFile(filename);
std::vector<QPDFObjectHandle> const& pages = pdf.getAllPages();
- assert(pages.size() == (size_t)npages);
+ assert(pages.size() == static_cast<size_t>(npages));
for (int i = 0; i < npages; ++i)
{
int pageno = i + 1;