summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_parser
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_parser
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_parser')
-rw-r--r--core/fpdfapi/fpdf_parser/cpdf_document.cpp2
-rw-r--r--core/fpdfapi/fpdf_parser/include/cpdf_document.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/fpdfapi/fpdf_parser/cpdf_document.cpp b/core/fpdfapi/fpdf_parser/cpdf_document.cpp
index c92e177dcc..ead1ac0455 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_document.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_document.cpp
@@ -753,7 +753,7 @@ CPDF_ColorSpace* CPDF_Document::LoadColorSpace(CPDF_Object* pCSObj,
CPDF_Pattern* CPDF_Document::LoadPattern(CPDF_Object* pPatternObj,
FX_BOOL bShading,
- const CFX_Matrix* matrix) {
+ const CFX_Matrix& matrix) {
return m_pDocPage->GetPattern(pPatternObj, bShading, matrix);
}
diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_document.h b/core/fpdfapi/fpdf_parser/include/cpdf_document.h
index 38c0fdda30..687619b763 100644
--- a/core/fpdfapi/fpdf_parser/include/cpdf_document.h
+++ b/core/fpdfapi/fpdf_parser/include/cpdf_document.h
@@ -70,7 +70,7 @@ class CPDF_Document : public CFX_PrivateData, public CPDF_IndirectObjectHolder {
CPDF_Pattern* LoadPattern(CPDF_Object* pObj,
FX_BOOL bShading,
- const CFX_Matrix* matrix = NULL);
+ const CFX_Matrix& matrix);
CPDF_Image* LoadImageF(CPDF_Object* pObj);
CPDF_StreamAcc* LoadFontFile(CPDF_Stream* pStream);