From 83d2351fd64128156c9abfb70266133d58a5e525 Mon Sep 17 00:00:00 2001 From: tsepez Date: Fri, 26 Aug 2016 14:56:39 -0700 Subject: Remove CFX_CountRef::IsNull in favor of operator bool Review-Url: https://codereview.chromium.org/2285513002 --- core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp') diff --git a/core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp b/core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp index b2eb5e642c..968c53bc07 100644 --- a/core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp +++ b/core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp @@ -35,12 +35,12 @@ CPDF_PageObject::Type CPDF_ShadingObject::GetType() const { } void CPDF_ShadingObject::Transform(const CFX_Matrix& matrix) { - if (!m_ClipPath.IsNull()) { + if (m_ClipPath) { m_ClipPath.GetModify(); m_ClipPath.Transform(matrix); } m_Matrix.Concat(matrix); - if (!m_ClipPath.IsNull()) { + if (m_ClipPath) { CalcBoundingBox(); } else { matrix.TransformRect(m_Left, m_Right, m_Top, m_Bottom); @@ -60,9 +60,8 @@ const CPDF_ShadingObject* CPDF_ShadingObject::AsShading() const { } void CPDF_ShadingObject::CalcBoundingBox() { - if (m_ClipPath.IsNull()) { + if (!m_ClipPath) return; - } CFX_FloatRect rect = m_ClipPath.GetClipBox(); m_Left = rect.left; m_Bottom = rect.bottom; -- cgit v1.2.3