summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-08-26 14:56:39 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-26 14:56:39 -0700
commit83d2351fd64128156c9abfb70266133d58a5e525 (patch)
treeb975e59ff6a31fbe86b289294fe65f9150e18fb6 /core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp
parent0ee35908e906922a423fb18d7085ef80d0d8d8c8 (diff)
downloadpdfium-83d2351fd64128156c9abfb70266133d58a5e525.tar.xz
Remove CFX_CountRef::IsNull in favor of operator bool
Review-Url: https://codereview.chromium.org/2285513002
Diffstat (limited to 'core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp')
-rw-r--r--core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp7
1 files changed, 3 insertions, 4 deletions
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;