From 30027481f7f9e9191f7c8deea51850b7a76b1b1f Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sat, 23 Feb 2013 21:46:21 -0500 Subject: Remove all old-style casts from C++ code --- libtests/concatenate.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libtests/concatenate.cc') 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 #include #include +#include #include #include 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 b2_buf = b2.getBuffer(); - std::string result((char const*)b2_buf->getBuffer(), b2_buf->getSize()); + std::string result(reinterpret_cast(b2_buf->getBuffer()), + b2_buf->getSize()); if (result == "-one--two-") { std::cout << "concatenate test passed" << std::endl; -- cgit v1.2.3-70-g09d2