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/fxge/dib/cfx_dibsource.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'core/fxge/dib/cfx_dibsource.h') diff --git a/core/fxge/dib/cfx_dibsource.h b/core/fxge/dib/cfx_dibsource.h index 0e7fb27dde..064dbe2055 100644 --- a/core/fxge/dib/cfx_dibsource.h +++ b/core/fxge/dib/cfx_dibsource.h @@ -44,6 +44,9 @@ class CFX_DIBSource : public Retainable { int clip_left, int clip_width) const = 0; + uint8_t* GetWritableScanline(int line) { + return const_cast(GetScanline(line)); + } int GetWidth() const { return m_Width; } int GetHeight() const { return m_Height; } -- cgit v1.2.3