From 9b8b217e6f8f2ff03b09d6075e689804928c7b3c Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 25 Apr 2018 22:12:34 +0000 Subject: Replace reinterpret_cast with static_cast where possible Change-Id: Ic62f1def8e043494c9fa6c08a937d7d872513567 Reviewed-on: https://pdfium-review.googlesource.com/31314 Commit-Queue: Tom Sepez Reviewed-by: dsinclair --- core/fpdfapi/parser/cpdf_crypto_handler.cpp | 4 ++-- core/fxcodec/bmp/cfx_bmpdecompressor.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'core') diff --git a/core/fpdfapi/parser/cpdf_crypto_handler.cpp b/core/fpdfapi/parser/cpdf_crypto_handler.cpp index c27f9dc9fc..76be23e9d6 100644 --- a/core/fpdfapi/parser/cpdf_crypto_handler.cpp +++ b/core/fpdfapi/parser/cpdf_crypto_handler.cpp @@ -180,11 +180,11 @@ bool CPDF_CryptoHandler::CryptStream(void* context, if (m_Cipher == FXCIPHER_RC4) { int old_size = dest_buf.GetSize(); dest_buf.AppendBlock(src_buf, src_size); - CRYPT_ArcFourCrypt(reinterpret_cast(context), + CRYPT_ArcFourCrypt(static_cast(context), dest_buf.GetBuffer() + old_size, src_size); return true; } - AESCryptContext* pContext = reinterpret_cast(context); + AESCryptContext* pContext = static_cast(context); if (pContext->m_bIV && bEncrypt) { dest_buf.AppendBlock(pContext->m_Block, 16); pContext->m_bIV = false; diff --git a/core/fxcodec/bmp/cfx_bmpdecompressor.cpp b/core/fxcodec/bmp/cfx_bmpdecompressor.cpp index 4494198b43..b490004853 100644 --- a/core/fxcodec/bmp/cfx_bmpdecompressor.cpp +++ b/core/fxcodec/bmp/cfx_bmpdecompressor.cpp @@ -66,7 +66,7 @@ void CFX_BmpDecompressor::Error() { void CFX_BmpDecompressor::ReadScanline(uint32_t row_num_, const std::vector& row_buf) { - auto* p = reinterpret_cast(context_ptr_); + auto* p = static_cast(context_ptr_); p->m_pDelegate->BmpReadScanline(row_num_, row_buf); } -- cgit v1.2.3