summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_page/cpdf_shadingpattern.cpp
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-04-26 22:41:36 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-26 22:41:36 -0700
commit12168d764be266a209bc3fd15dbe4223732ae319 (patch)
treee4a10cbf579ae2b5023474f995fdffbdb5ee9959 /core/fpdfapi/fpdf_page/cpdf_shadingpattern.cpp
parent931bf37379db7274d0e42f68cf358749cb05ba89 (diff)
downloadpdfium-12168d764be266a209bc3fd15dbe4223732ae319.tar.xz
CPDF_Document::LoadPattern() and friends always have a valid matrix.
So pass by const-ref instead of by pointer. Review URL: https://codereview.chromium.org/1923153002
Diffstat (limited to 'core/fpdfapi/fpdf_page/cpdf_shadingpattern.cpp')
-rw-r--r--core/fpdfapi/fpdf_page/cpdf_shadingpattern.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/fpdfapi/fpdf_page/cpdf_shadingpattern.cpp b/core/fpdfapi/fpdf_page/cpdf_shadingpattern.cpp
index 457de9667a..b7174b4451 100644
--- a/core/fpdfapi/fpdf_page/cpdf_shadingpattern.cpp
+++ b/core/fpdfapi/fpdf_page/cpdf_shadingpattern.cpp
@@ -25,7 +25,7 @@ ShadingType ToShadingType(int type) {
CPDF_ShadingPattern::CPDF_ShadingPattern(CPDF_Document* pDoc,
CPDF_Object* pPatternObj,
FX_BOOL bShading,
- const CFX_Matrix* parentMatrix)
+ const CFX_Matrix& parentMatrix)
: CPDF_Pattern(SHADING,
pDoc,
bShading ? nullptr : pPatternObj,
@@ -40,8 +40,7 @@ CPDF_ShadingPattern::CPDF_ShadingPattern(CPDF_Document* pDoc,
CPDF_Dictionary* pDict = m_pPatternObj->GetDict();
m_Pattern2Form = pDict->GetMatrixBy("Matrix");
m_pShadingObj = pDict->GetDirectObjectBy("Shading");
- if (parentMatrix)
- m_Pattern2Form.Concat(*parentMatrix);
+ m_Pattern2Form.Concat(parentMatrix);
}
for (size_t i = 0; i < FX_ArraySize(m_pFunctions); ++i)
m_pFunctions[i] = nullptr;