From 7d2a8d966643ebc77c1aa0f0c53a0ffd2d681c4c Mon Sep 17 00:00:00 2001 From: tsepez Date: Wed, 8 Jun 2016 11:51:23 -0700 Subject: Remove implicit CFX_CountedRef::operator T*() Explicitly invoke GetObject() method instead. This avoids having code where it looks like non-pointers are assigned to pointers but works due to the cast operator. Review-Url: https://codereview.chromium.org/2045083003 --- fpdfsdk/fpdf_transformpage.cpp | 2 +- fpdfsdk/fpdfeditpage.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'fpdfsdk') diff --git a/fpdfsdk/fpdf_transformpage.cpp b/fpdfsdk/fpdf_transformpage.cpp index b78c79c3fc..a5c2741a88 100644 --- a/fpdfsdk/fpdf_transformpage.cpp +++ b/fpdfsdk/fpdf_transformpage.cpp @@ -232,7 +232,7 @@ DLLEXPORT void STDCALL FPDF_DestroyClipPath(FPDF_CLIPPATH clipPath) { } void OutputPath(CFX_ByteTextBuf& buf, CPDF_Path path) { - const CFX_PathData* pPathData = path; + const CFX_PathData* pPathData = path.GetObject(); if (!pPathData) return; diff --git a/fpdfsdk/fpdfeditpage.cpp b/fpdfsdk/fpdfeditpage.cpp index 6f71a86548..439f73a7ae 100644 --- a/fpdfsdk/fpdfeditpage.cpp +++ b/fpdfsdk/fpdfeditpage.cpp @@ -211,7 +211,8 @@ FPDFPageObj_HasTransparency(FPDF_PAGEOBJECT pageObject) { return FALSE; CPDF_PageObject* pPageObj = (CPDF_PageObject*)pageObject; - const CPDF_GeneralStateData* pGeneralState = pPageObj->m_GeneralState; + const CPDF_GeneralStateData* pGeneralState = + pPageObj->m_GeneralState.GetObject(); int blend_type = pGeneralState ? pGeneralState->m_BlendType : FXDIB_BLEND_NORMAL; if (blend_type != FXDIB_BLEND_NORMAL) -- cgit v1.2.3