From 56e04d2656bdd5f2b9448d857e8e73ab16aadf8e Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Tue, 21 Nov 2017 22:07:50 +0000 Subject: Avoid passing pointers by reference in core. This gets rid of most core/ non-const ref passing, either by passing by pointer-to-pointer instead, or by returning std::pair. Change-Id: Id7bdc355a1a725a05f9fa2f1e982ca8c975beef1 Reviewed-on: https://pdfium-review.googlesource.com/19030 Commit-Queue: Lei Zhang Reviewed-by: dsinclair --- core/fxcodec/codec/fx_codec_progress.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/fxcodec/codec/fx_codec_progress.cpp') diff --git a/core/fxcodec/codec/fx_codec_progress.cpp b/core/fxcodec/codec/fx_codec_progress.cpp index 746a574bbc..f20e18c06b 100644 --- a/core/fxcodec/codec/fx_codec_progress.cpp +++ b/core/fxcodec/codec/fx_codec_progress.cpp @@ -395,7 +395,7 @@ bool CCodec_ProgressiveDecoder::PngReadHeader(int width, return true; } -bool CCodec_ProgressiveDecoder::PngAskScanlineBuf(int line, uint8_t*& src_buf) { +bool CCodec_ProgressiveDecoder::PngAskScanlineBuf(int line, uint8_t** pSrcBuf) { RetainPtr pDIBitmap = m_pDeviceBitmap; if (!pDIBitmap) { NOTREACHED(); @@ -406,7 +406,7 @@ bool CCodec_ProgressiveDecoder::PngAskScanlineBuf(int line, uint8_t*& src_buf) { int32_t row = (int32_t)((line - m_clipBox.top) * scale_y) + m_startY; uint8_t* src_scan = (uint8_t*)pDIBitmap->GetScanline(row); uint8_t* des_scan = m_pDecodeBuf; - src_buf = m_pDecodeBuf; + *pSrcBuf = m_pDecodeBuf; int32_t src_Bpp = pDIBitmap->GetBPP() >> 3; int32_t des_Bpp = (m_SrcFormat & 0xff) >> 3; int32_t src_left = m_startX; -- cgit v1.2.3