From 4174b5ab6ac9024acb9b42acbb61d628a2a679e3 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 10 Aug 2018 00:13:37 +0000 Subject: Add CFX_DIBSource::GetWritableScanline(). Remove a bunch of const_cast or equivalent. This will also help when we convert to span<>, since casting spans is a nuisance. Change-Id: I330e5041cbaf33a84425fc4242a3dfacf5ca8011 Reviewed-on: https://pdfium-review.googlesource.com/39831 Commit-Queue: Lei Zhang Reviewed-by: Lei Zhang --- core/fxcodec/codec/ccodec_tiffmodule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/fxcodec/codec/ccodec_tiffmodule.cpp') diff --git a/core/fxcodec/codec/ccodec_tiffmodule.cpp b/core/fxcodec/codec/ccodec_tiffmodule.cpp index 1a7a51af80..5f74b28cdc 100644 --- a/core/fxcodec/codec/ccodec_tiffmodule.cpp +++ b/core/fxcodec/codec/ccodec_tiffmodule.cpp @@ -463,7 +463,7 @@ bool CTiffContext::Decode(const RetainPtr& pDIBitmap) { (uint32*)pDIBitmap->GetBuffer(), rotation, 1)) { for (uint32_t row = 0; row < img_height; row++) { - uint8_t* row_buf = (uint8_t*)pDIBitmap->GetScanline(row); + uint8_t* row_buf = pDIBitmap->GetWritableScanline(row); TiffBGRA2RGBA(row_buf, img_width, 4); } return true; -- cgit v1.2.3