diff options
author | Lei Zhang <thestig@chromium.org> | 2017-05-10 14:00:53 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-05-10 21:08:04 +0000 |
commit | 0a0892626d24ce82e7026c32c71b1de036d4bbe1 (patch) | |
tree | 470bca7e1c5b27c967d246706d21018fd4d2d1f2 /core/fpdfapi/page/cpdf_shadingobject.cpp | |
parent | 6f62ccd50ff85ba6a60ddf47993745739854cd8f (diff) | |
download | pdfium-0a0892626d24ce82e7026c32c71b1de036d4bbe1.tar.xz |
Replace operator bool with HasRef() in classes with a CFX_SharedCopyOnWrite member.
Change-Id: I51e30d298e87b9ae0d5aca83b2f1d6787efce70a
Reviewed-on: https://pdfium-review.googlesource.com/5290
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_shadingobject.cpp')
-rw-r--r-- | core/fpdfapi/page/cpdf_shadingobject.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fpdfapi/page/cpdf_shadingobject.cpp b/core/fpdfapi/page/cpdf_shadingobject.cpp index 928b0af47e..5454380cae 100644 --- a/core/fpdfapi/page/cpdf_shadingobject.cpp +++ b/core/fpdfapi/page/cpdf_shadingobject.cpp @@ -19,11 +19,11 @@ CPDF_PageObject::Type CPDF_ShadingObject::GetType() const { } void CPDF_ShadingObject::Transform(const CFX_Matrix& matrix) { - if (m_ClipPath) + if (m_ClipPath.HasRef()) m_ClipPath.Transform(matrix); m_Matrix.Concat(matrix); - if (m_ClipPath) { + if (m_ClipPath.HasRef()) { CalcBoundingBox(); } else { matrix.TransformRect(m_Left, m_Right, m_Top, m_Bottom); @@ -43,7 +43,7 @@ const CPDF_ShadingObject* CPDF_ShadingObject::AsShading() const { } void CPDF_ShadingObject::CalcBoundingBox() { - if (!m_ClipPath) + if (!m_ClipPath.HasRef()) return; CFX_FloatRect rect = m_ClipPath.GetClipBox(); m_Left = rect.left; |