diff options
author | Lei Zhang <thestig@chromium.org> | 2018-05-22 16:08:28 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-22 16:08:28 +0000 |
commit | 101da6bc6d6cb5b8dabeaf19a7a0758017f37958 (patch) | |
tree | 462e5972c022e92a523ba6b44d377c687d0f154e /core/fxcodec/jbig2/JBig2_Image.cpp | |
parent | 1f4d8492095a3d6c6d3452ef075a91d4764a5dc5 (diff) | |
download | pdfium-101da6bc6d6cb5b8dabeaf19a7a0758017f37958.tar.xz |
Remove JBIG2_memcpy() and JBIG2_memset().
Just use memcpy() and memset().
Change-Id: Id6c6fab4e65a5524786ae318270c5981313825f2
Reviewed-on: https://pdfium-review.googlesource.com/32743
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fxcodec/jbig2/JBig2_Image.cpp')
-rw-r--r-- | core/fxcodec/jbig2/JBig2_Image.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/core/fxcodec/jbig2/JBig2_Image.cpp b/core/fxcodec/jbig2/JBig2_Image.cpp index 2719c2733d..442a36d2a6 100644 --- a/core/fxcodec/jbig2/JBig2_Image.cpp +++ b/core/fxcodec/jbig2/JBig2_Image.cpp @@ -7,6 +7,7 @@ #include "core/fxcodec/jbig2/JBig2_Image.h" #include <limits.h> +#include <string.h> #include <algorithm> #include <memory> @@ -62,7 +63,7 @@ CJBig2_Image::CJBig2_Image(const CJBig2_Image& other) if (other.m_pData) { m_pData.Reset(std::unique_ptr<uint8_t, FxFreeDeleter>( FX_Alloc2D(uint8_t, m_nStride, m_nHeight))); - JBIG2_memcpy(data(), other.data(), m_nStride * m_nHeight); + memcpy(data(), other.data(), m_nStride * m_nHeight); } } @@ -109,17 +110,16 @@ void CJBig2_Image::CopyLine(int32_t hTo, int32_t hFrom) { return; if (hFrom < 0 || hFrom >= m_nHeight) { - JBIG2_memset(data() + hTo * m_nStride, 0, m_nStride); + memset(data() + hTo * m_nStride, 0, m_nStride); } else { - JBIG2_memcpy(data() + hTo * m_nStride, data() + hFrom * m_nStride, - m_nStride); + memcpy(data() + hTo * m_nStride, data() + hFrom * m_nStride, m_nStride); } } void CJBig2_Image::Fill(bool v) { if (!m_pData) return; - JBIG2_memset(data(), v ? 0xff : 0, m_nStride * m_nHeight); + memset(data(), v ? 0xff : 0, m_nStride * m_nHeight); } bool CJBig2_Image::ComposeTo(CJBig2_Image* pDst, int32_t x, @@ -234,10 +234,10 @@ void CJBig2_Image::Expand(int32_t h, bool v) { uint8_t* pExternalBuffer = data(); m_pData.Reset(std::unique_ptr<uint8_t, FxFreeDeleter>( FX_Alloc(uint8_t, h * m_nStride))); - JBIG2_memcpy(data(), pExternalBuffer, m_nHeight * m_nStride); + memcpy(data(), pExternalBuffer, m_nHeight * m_nStride); } - JBIG2_memset(data() + m_nHeight * m_nStride, v ? 0xff : 0, - (h - m_nHeight) * m_nStride); + memset(data() + m_nHeight * m_nStride, v ? 0xff : 0, + (h - m_nHeight) * m_nStride); m_nHeight = h; } |