From 8444b6a1bf03678c195e78612585e93724baacc5 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 27 Jun 2018 18:24:10 +0000 Subject: Remove unused m_bGif* fields from CFX_DIBAttribute Two are completely unused, and two are set but never referenced. Change-Id: I0173123e33a4240aef9ed24aaee9e1df6cf9aa0a Reviewed-on: https://pdfium-review.googlesource.com/36290 Reviewed-by: dsinclair Commit-Queue: Tom Sepez --- core/fxcodec/codec/ccodec_gifmodule.cpp | 8 ++++---- core/fxcodec/fx_codec.h | 6 ------ 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/core/fxcodec/codec/ccodec_gifmodule.cpp b/core/fxcodec/codec/ccodec_gifmodule.cpp index 9911d0f5e0..7bf216e393 100644 --- a/core/fxcodec/codec/ccodec_gifmodule.cpp +++ b/core/fxcodec/codec/ccodec_gifmodule.cpp @@ -57,12 +57,12 @@ CFX_GifDecodeStatus CCodec_GifModule::LoadFrame(Context* pContext, CFX_DIBAttribute* pAttribute) { auto* context = static_cast(pContext); CFX_GifDecodeStatus ret = context->LoadFrame(frame_num); - if (ret != CFX_GifDecodeStatus::Success || !pAttribute) + if (ret != CFX_GifDecodeStatus::Success) return ret; - pAttribute->m_nGifLeft = context->images_[frame_num]->image_info.left; - pAttribute->m_nGifTop = context->images_[frame_num]->image_info.top; - pAttribute->m_fAspectRatio = context->pixel_aspect_; + if (pAttribute) + pAttribute->m_fAspectRatio = context->pixel_aspect_; + return CFX_GifDecodeStatus::Success; } diff --git a/core/fxcodec/fx_codec.h b/core/fxcodec/fx_codec.h index 458358085a..1eaf846fd7 100644 --- a/core/fxcodec/fx_codec.h +++ b/core/fxcodec/fx_codec.h @@ -59,12 +59,6 @@ class CFX_DIBAttribute { #ifdef PDF_ENABLE_XFA_BMP int32_t m_nBmpCompressType = 0; #endif // PDF_ENABLE_XFA_BMP -#ifdef PDF_ENABLE_XFA_GIF - int32_t m_nGifLeft = 0; - int32_t m_nGifTop = 0; - uint32_t* m_pGifLocalPalette = nullptr; - uint32_t m_nGifLocalPalNum = 0; -#endif // PDF_ENABLE_XFA_GIF int32_t m_nXDPI = -1; int32_t m_nYDPI = -1; -- cgit v1.2.3