summaryrefslogtreecommitdiff
path: root/core/fxcodec
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-07-25 22:56:45 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-07-25 22:56:45 +0000
commit91b8302dec04ca4ddc1f91545d192350665580cf (patch)
tree2be296f06f2b933a051cdcad608a0705f5a28b0c /core/fxcodec
parenta35063cb627d611e77816216d0d8946794a98079 (diff)
downloadpdfium-chromium/3503.tar.xz
Use incomplete type CFX_BmpContext in place of void*chromium/3503
Allows killing off static_cast<> in two places. Change-Id: I467b69d92e8cbda5c2916b6ed2e97c173d8b4f2f Reviewed-on: https://pdfium-review.googlesource.com/38897 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcodec')
-rw-r--r--core/fxcodec/bmp/cfx_bmpdecompressor.cpp6
-rw-r--r--core/fxcodec/bmp/cfx_bmpdecompressor.h8
2 files changed, 5 insertions, 9 deletions
diff --git a/core/fxcodec/bmp/cfx_bmpdecompressor.cpp b/core/fxcodec/bmp/cfx_bmpdecompressor.cpp
index b490004853..c56d17d15d 100644
--- a/core/fxcodec/bmp/cfx_bmpdecompressor.cpp
+++ b/core/fxcodec/bmp/cfx_bmpdecompressor.cpp
@@ -66,13 +66,11 @@ void CFX_BmpDecompressor::Error() {
void CFX_BmpDecompressor::ReadScanline(uint32_t row_num_,
const std::vector<uint8_t>& row_buf) {
- auto* p = static_cast<CFX_BmpContext*>(context_ptr_);
- p->m_pDelegate->BmpReadScanline(row_num_, row_buf);
+ context_ptr_->m_pDelegate->BmpReadScanline(row_num_, row_buf);
}
bool CFX_BmpDecompressor::GetDataPosition(uint32_t rcd_pos) {
- auto* p = reinterpret_cast<CFX_BmpContext*>(context_ptr_);
- return p->m_pDelegate->BmpInputImagePositionBuf(rcd_pos);
+ return context_ptr_->m_pDelegate->BmpInputImagePositionBuf(rcd_pos);
}
int32_t CFX_BmpDecompressor::ReadHeader() {
diff --git a/core/fxcodec/bmp/cfx_bmpdecompressor.h b/core/fxcodec/bmp/cfx_bmpdecompressor.h
index 152a2bd0ee..2f1585e649 100644
--- a/core/fxcodec/bmp/cfx_bmpdecompressor.h
+++ b/core/fxcodec/bmp/cfx_bmpdecompressor.h
@@ -16,6 +16,8 @@
#include "core/fxcrt/cfx_memorystream.h"
+class CFX_BmpContext;
+
class CFX_BmpDecompressor {
public:
CFX_BmpDecompressor();
@@ -28,12 +30,9 @@ class CFX_BmpDecompressor {
FX_FILESIZE GetAvailInput(uint8_t** avail_buf);
jmp_buf jmpbuf_;
-
- void* context_ptr_;
-
+ CFX_BmpContext* context_ptr_;
std::vector<uint8_t> out_row_buffer_;
std::vector<uint32_t> palette_;
-
uint32_t header_offset_;
uint32_t width_;
uint32_t height_;
@@ -56,7 +55,6 @@ class CFX_BmpDecompressor {
uint32_t mask_red_;
uint32_t mask_green_;
uint32_t mask_blue_;
-
int32_t decode_status_;
private: