aboutsummaryrefslogtreecommitdiffstats
path: root/libtests/concatenate.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/concatenate.cc
parentbabb47948a408ebad12c452ba3fdd78782360167 (diff)
downloadqpdf-30027481f7f9e9191f7c8deea51850b7a76b1b1f.tar.zst
Remove all old-style casts from C++ code
Diffstat (limited to 'libtests/concatenate.cc')
-rw-r--r--libtests/concatenate.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/libtests/concatenate.cc b/libtests/concatenate.cc
index cf4332cb..41f88eb6 100644
--- a/libtests/concatenate.cc
+++ b/libtests/concatenate.cc
@@ -1,12 +1,13 @@
#include <qpdf/Pl_Concatenate.hh>
#include <qpdf/Pl_Flate.hh>
#include <qpdf/Pl_Buffer.hh>
+#include <qpdf/QUtil.hh>
#include <iostream>
#include <assert.h>
static void pipeStringAndFinish(Pipeline* p, std::string const& str)
{
- p->write((unsigned char*)str.c_str(), str.length());
+ p->write(QUtil::unsigned_char_pointer(str), str.length());
p->finish();
}
@@ -25,7 +26,8 @@ int main(int argc, char* argv[])
inflate.write(b1_buf->getBuffer(), b1_buf->getSize());
inflate.finish();
PointerHolder<Buffer> b2_buf = b2.getBuffer();
- std::string result((char const*)b2_buf->getBuffer(), b2_buf->getSize());
+ std::string result(reinterpret_cast<char*>(b2_buf->getBuffer()),
+ b2_buf->getSize());
if (result == "-one--two-")
{
std::cout << "concatenate test passed" << std::endl;