From 61899373fcf97ccbe525b001130bc71d61839498 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Tue, 1 Aug 2017 10:55:08 -0700 Subject: Remove unused CPDF_FlateEncoder ctor. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Callers removed in commit 4b78b18. Change-Id: I6eec6ba18712040180b12d56b59c6a8379de4379 Reviewed-on: https://pdfium-review.googlesource.com/9750 Reviewed-by: Nicolás Peña Commit-Queue: Lei Zhang --- core/fpdfapi/edit/cpdf_flateencoder.cpp | 21 --------------------- core/fpdfapi/edit/cpdf_flateencoder.h | 4 ---- 2 files changed, 25 deletions(-) diff --git a/core/fpdfapi/edit/cpdf_flateencoder.cpp b/core/fpdfapi/edit/cpdf_flateencoder.cpp index 55d436f573..f8e2b5ad55 100644 --- a/core/fpdfapi/edit/cpdf_flateencoder.cpp +++ b/core/fpdfapi/edit/cpdf_flateencoder.cpp @@ -45,27 +45,6 @@ CPDF_FlateEncoder::CPDF_FlateEncoder(CPDF_Stream* pStream, bool bFlateEncode) m_pDict->RemoveFor("DecodeParms"); } -CPDF_FlateEncoder::CPDF_FlateEncoder(const uint8_t* pBuffer, - uint32_t size, - bool bFlateEncode, - bool bXRefStream) - : m_dwSize(0) { - if (!bFlateEncode) { - m_pData = const_cast(pBuffer); - m_dwSize = size; - return; - } - - uint8_t* buffer = nullptr; - // TODO(thestig): Move to Init() and check return value. - if (bXRefStream) - ::PngEncode(pBuffer, size, &buffer, &m_dwSize); - else - ::FlateEncode(pBuffer, size, &buffer, &m_dwSize); - - m_pData = std::unique_ptr(buffer); -} - CPDF_FlateEncoder::~CPDF_FlateEncoder() {} void CPDF_FlateEncoder::CloneDict() { diff --git a/core/fpdfapi/edit/cpdf_flateencoder.h b/core/fpdfapi/edit/cpdf_flateencoder.h index ac850e2802..ee946582ef 100644 --- a/core/fpdfapi/edit/cpdf_flateencoder.h +++ b/core/fpdfapi/edit/cpdf_flateencoder.h @@ -18,10 +18,6 @@ class CPDF_Stream; class CPDF_FlateEncoder { public: CPDF_FlateEncoder(CPDF_Stream* pStream, bool bFlateEncode); - CPDF_FlateEncoder(const uint8_t* pBuffer, - uint32_t size, - bool bFlateEncode, - bool bXRefStream); ~CPDF_FlateEncoder(); void CloneDict(); -- cgit v1.2.3