From 761660c4074269ac806d06c9bef70e4e9fb0eb29 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 17 Dec 2015 13:35:22 -0800 Subject: Tidy CPDF_RenderContext - Remove unused Clear() method. - Replace Create() with actual ctors. - Avoid const casts. - Protect members. - Add missing const in adjacent code. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1536623004 . --- fpdfsdk/src/fpdfview.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'fpdfsdk') diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp index c719cea9ec..daf9cfcbcf 100644 --- a/fpdfsdk/src/fpdfview.cpp +++ b/fpdfsdk/src/fpdfview.cpp @@ -736,8 +736,7 @@ void FPDF_RenderPage_Retail(CRenderContext* pContext, pContext->m_pDevice->SaveState(); pContext->m_pDevice->SetClip_Rect(&clip); - pContext->m_pContext = new CPDF_RenderContext; - pContext->m_pContext->Create(pPage); + pContext->m_pContext = new CPDF_RenderContext(pPage); pContext->m_pContext->AppendObjectList(pPage, &matrix); if (flags & FPDF_ANNOT) { -- cgit v1.2.3