Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Unified Diff: core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp

Issue 2285513002: Remove CFX_CountRef::IsNull in favor of operator bool (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@retain_again
Patch Set: Rebase, FX_BOOL Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_pathobject.cpp ('k') | core/fpdfapi/fpdf_page/fpdf_page_parser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: 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 b2eb5e642c34a44631ae95b64c8b673ef3c54e97..968c53bc073b71c8367f6a93d2cb3ccd4e884a66 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;
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_pathobject.cpp ('k') | core/fpdfapi/fpdf_page/fpdf_page_parser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698