fixed old-style-cast warning when using libgcrypt

This commit is contained in:
Alden Torres 2018-08-28 08:52:48 -04:00 committed by Arvid Norberg
parent 55215742af
commit b660e526b1
2 changed files with 2 additions and 2 deletions

View File

@ -114,7 +114,7 @@ namespace libtorrent {
sha1_hash digest;
#ifdef TORRENT_USE_LIBGCRYPT
gcry_md_final(m_context);
digest.assign((char const*)gcry_md_read(m_context, 0));
digest.assign(reinterpret_cast<char const*>(gcry_md_read(m_context, 0)));
#elif TORRENT_USE_COMMONCRYPTO
CC_SHA1_Final(reinterpret_cast<unsigned char*>(digest.data()), &m_context);
#elif TORRENT_USE_CRYPTOAPI

View File

@ -102,7 +102,7 @@ namespace libtorrent {
sha512_hash digest;
#ifdef TORRENT_USE_LIBGCRYPT
gcry_md_final(m_context);
digest.assign((char const*)gcry_md_read(m_context, 0));
digest.assign(reinterpret_cast<char const*>(gcry_md_read(m_context, 0)));
#elif TORRENT_USE_COMMONCRYPTO
CC_SHA512_Final(reinterpret_cast<unsigned char*>(digest.data()), &m_context);
#elif TORRENT_USE_CRYPTOAPI_SHA_512