From a1188905b85a84d950f94df0f229b9f1d5784c61 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 11 Oct 2018 23:09:10 +0000 Subject: Use pdfium::Vector2D in CCodec_FaxEncoder ctor. Instead of manual CHECKs. Change-Id: I387008bea88cba9b9b3e813631d9fc02ac7eb3a9 Reviewed-on: https://pdfium-review.googlesource.com/c/43932 Reviewed-by: Tom Sepez Commit-Queue: Lei Zhang --- core/fxcodec/codec/ccodec_faxmodule.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/core/fxcodec/codec/ccodec_faxmodule.cpp b/core/fxcodec/codec/ccodec_faxmodule.cpp index 905f6472d2..6a07d5605b 100644 --- a/core/fxcodec/codec/ccodec_faxmodule.cpp +++ b/core/fxcodec/codec/ccodec_faxmodule.cpp @@ -8,7 +8,6 @@ #include #include -#include #include #include @@ -678,11 +677,9 @@ CCodec_FaxEncoder::CCodec_FaxEncoder(const uint8_t* src_buf, int height, int pitch) : m_Cols(width), m_Rows(height), m_Pitch(pitch), m_pSrcBuf(src_buf) { - CHECK(pitch > 0); - CHECK(pitch < std::numeric_limits::max() / 8); m_RefLine.resize(pitch); std::fill(std::begin(m_RefLine), std::end(m_RefLine), 0xff); - m_LineBuf.resize(8 * m_Pitch); + m_LineBuf = pdfium::Vector2D(8, m_Pitch); m_DestBuf.SetAllocStep(10240); } -- cgit v1.2.3