aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/Pl_SHA2.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 /libqpdf/Pl_SHA2.cc
parentbabb47948a408ebad12c452ba3fdd78782360167 (diff)
downloadqpdf-30027481f7f9e9191f7c8deea51850b7a76b1b1f.tar.zst
Remove all old-style casts from C++ code
Diffstat (limited to 'libqpdf/Pl_SHA2.cc')
-rw-r--r--libqpdf/Pl_SHA2.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/libqpdf/Pl_SHA2.cc b/libqpdf/Pl_SHA2.cc
index 84f24d6e..17eff7e3 100644
--- a/libqpdf/Pl_SHA2.cc
+++ b/libqpdf/Pl_SHA2.cc
@@ -128,13 +128,16 @@ Pl_SHA2::getRawDigest()
switch (bits)
{
case 256:
- result = std::string((char*)this->sha256sum, sizeof(this->sha256sum));
+ result = std::string(reinterpret_cast<char*>(this->sha256sum),
+ sizeof(this->sha256sum));
break;
case 384:
- result = std::string((char*)this->sha384sum, sizeof(this->sha384sum));
+ result = std::string(reinterpret_cast<char*>(this->sha384sum),
+ sizeof(this->sha384sum));
break;
case 512:
- result = std::string((char*)this->sha512sum, sizeof(this->sha512sum));
+ result = std::string(reinterpret_cast<char*>(this->sha512sum),
+ sizeof(this->sha512sum));
break;
default:
badBits();