From b32a949d667600cb33e80e1bb8c97a23d96f27d9 Mon Sep 17 00:00:00 2001 From: Nicolas Pena Date: Thu, 22 Jun 2017 14:23:52 -0400 Subject: Continue BMP decoder cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This CL replaces raw pointers with vector and unique_ptr. It also fixes other nits. Change-Id: I45c99c9aa658681ec3f0b48fc4f407b278b250f5 Reviewed-on: https://pdfium-review.googlesource.com/6830 Commit-Queue: Nicolás Peña Reviewed-by: Lei Zhang --- core/fxcodec/codec/ccodec_bmpmodule.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/fxcodec/codec/ccodec_bmpmodule.cpp') diff --git a/core/fxcodec/codec/ccodec_bmpmodule.cpp b/core/fxcodec/codec/ccodec_bmpmodule.cpp index 1c8112498c..a64e6783e1 100644 --- a/core/fxcodec/codec/ccodec_bmpmodule.cpp +++ b/core/fxcodec/codec/ccodec_bmpmodule.cpp @@ -39,7 +39,7 @@ int32_t CCodec_BmpModule::ReadHeader(Context* pContext, bool* tb_flag, int32_t* components, int32_t* pal_num, - uint32_t** pal_pp, + std::vector* palette, CFX_DIBAttribute* pAttribute) { auto* ctx = static_cast(pContext); if (setjmp(ctx->m_Bmp.jmpbuf)) @@ -54,7 +54,7 @@ int32_t CCodec_BmpModule::ReadHeader(Context* pContext, *tb_flag = ctx->m_Bmp.imgTB_flag; *components = ctx->m_Bmp.components; *pal_num = ctx->m_Bmp.pal_num; - *pal_pp = ctx->m_Bmp.pal_ptr; + *palette = ctx->m_Bmp.palette; if (pAttribute) { pAttribute->m_wDPIUnit = FXCODEC_RESUNIT_METER; pAttribute->m_nXDPI = ctx->m_Bmp.dpi_x; -- cgit v1.2.3