Remove out params from CPDF_DIB::GetDecodeAndMaskArray() It is always called with the address of the same members as arguments in all cases. Change-Id: I6a4ee7c4e24620d03db6010440ecde8dd7b52cbb Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/93050 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/core/fpdfapi/page/cpdf_dib.cpp b/core/fpdfapi/page/cpdf_dib.cpp index 9c0798a..8fd881b 100644 --- a/core/fpdfapi/page/cpdf_dib.cpp +++ b/core/fpdfapi/page/cpdf_dib.cpp
@@ -377,10 +377,10 @@ if (!ValidateDictParam(filter)) return false; - return GetDecodeAndMaskArray(&m_bDefaultDecode, &m_bColorKey); + return GetDecodeAndMaskArray(); } -bool CPDF_DIB::GetDecodeAndMaskArray(bool* bDefaultDecode, bool* bColorKey) { +bool CPDF_DIB::GetDecodeAndMaskArray() { if (!m_pColorSpace) return false; @@ -399,7 +399,7 @@ if (m_Family == CPDF_ColorSpace::Family::kIndexed) def_max = max_data; if (def_min != m_CompData[i].m_DecodeMin || def_max != max) - *bDefaultDecode = false; + m_bDefaultDecode = false; } } else { for (uint32_t i = 0; i < m_nComponents; i++) { @@ -428,7 +428,7 @@ m_CompData[i].m_ColorKeyMax = std::min(max_num, max_data); } } - *bColorKey = true; + m_bColorKey = true; } return true; } @@ -553,7 +553,7 @@ if (m_Family == CPDF_ColorSpace::Family::kLab && m_nComponents != 3) return false; } - if (!GetDecodeAndMaskArray(&m_bDefaultDecode, &m_bColorKey)) + if (!GetDecodeAndMaskArray()) return false; m_bpc = info.bits_per_components;
diff --git a/core/fpdfapi/page/cpdf_dib.h b/core/fpdfapi/page/cpdf_dib.h index 3655a8c..1bf5c32 100644 --- a/core/fpdfapi/page/cpdf_dib.h +++ b/core/fpdfapi/page/cpdf_dib.h
@@ -84,7 +84,7 @@ LoadState ContinueLoadMaskDIB(PauseIndicatorIface* pPause); bool LoadColorInfo(const CPDF_Dictionary* pFormResources, const CPDF_Dictionary* pPageResources); - bool GetDecodeAndMaskArray(bool* bDefaultDecode, bool* bColorKey); + bool GetDecodeAndMaskArray(); RetainPtr<CFX_DIBitmap> LoadJpxBitmap(); void LoadPalette(); LoadState CreateDecoder();