diff options
-rw-r--r-- | core/fxcodec/bmp/cfx_bmpdecompressor.cpp | 6 | ||||
-rw-r--r-- | core/fxcodec/bmp/cfx_bmpdecompressor.h | 8 |
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: |