From 3e96043e8843a4aa16ebbcd3577061ef438bafac Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Thu, 13 Oct 2016 10:09:40 +0200 Subject: [PATCH] Aesthetic modifications --- src/hex.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hex.cpp b/src/hex.cpp index 38eb755..4dcd10a 100644 --- a/src/hex.cpp +++ b/src/hex.cpp @@ -25,7 +25,7 @@ size_t WXEXTEND_API wxHexEncode(char *dst, size_t dstLen, const void *src_, size { wxCHECK_MSG( src_, wxCONV_FAILED, wxT("NULL input buffer") ); - const unsigned char *src = static_cast(src_); + const unsigned char *src = reinterpret_cast(src_); static const char bhex[] = "0123456789ABCDEF"; @@ -51,7 +51,7 @@ size_t WXEXTEND_API wxHexDecode(void *dst_, size_t dstLen, const char *src, size { wxCHECK_MSG( src, wxCONV_FAILED, wxT("NULL input buffer") ); - unsigned char *dst = static_cast(dst_); + unsigned char *dst = reinterpret_cast(dst_); size_t decLen = 0; @@ -66,7 +66,7 @@ size_t WXEXTEND_API wxHexDecode(void *dst_, size_t dstLen, const char *src, size const char *p; for ( p = src; srcLen; p++, srcLen-- ) { - const unsigned char c = static_cast(*p); + const unsigned char c = *reinterpret_cast(p); if ( '0' <= c && c <= '9' ) in = (in << 4) | (c - '0') , n++; else if ( 'A' <= c && c <= 'F' ) in = (in << 4) | (c - 'A' + 10), n++; else if ( 'a' <= c && c <= 'f' ) in = (in << 4) | (c - 'a' + 10), n++;