diff options
author | tsepez <tsepez@chromium.org> | 2016-09-02 16:56:21 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-09-02 16:56:21 -0700 |
commit | 6296f2d501e2749d98e890ed722f923ee584c9ca (patch) | |
tree | b2eaeda969c65c52132f75cc0391cbd35ee6557a /core/fpdfapi | |
parent | e106b50129d5b8ce50228c67d3b0170bc46c4b2e (diff) | |
download | pdfium-6296f2d501e2749d98e890ed722f923ee584c9ca.tar.xz |
Remove CFX_Matrix::Copy() in favor of assignment
The default assignment operator will suffice and allows
us to write matrix1 = matrix2;
Review-Url: https://codereview.chromium.org/2307953003
Diffstat (limited to 'core/fpdfapi')
-rw-r--r-- | core/fpdfapi/fpdf_page/cpdf_allstates.cpp | 6 | ||||
-rw-r--r-- | core/fpdfapi/fpdf_page/fpdf_page_parser.cpp | 3 | ||||
-rw-r--r-- | core/fpdfapi/fpdf_render/fpdf_render_text.cpp | 2 |
3 files changed, 5 insertions, 6 deletions
diff --git a/core/fpdfapi/fpdf_page/cpdf_allstates.cpp b/core/fpdfapi/fpdf_page/cpdf_allstates.cpp index b92f10b095..2883c26309 100644 --- a/core/fpdfapi/fpdf_page/cpdf_allstates.cpp +++ b/core/fpdfapi/fpdf_page/cpdf_allstates.cpp @@ -30,9 +30,9 @@ CPDF_AllStates::~CPDF_AllStates() {} void CPDF_AllStates::Copy(const CPDF_AllStates& src) { CopyStates(src); - m_TextMatrix.Copy(src.m_TextMatrix); - m_ParentMatrix.Copy(src.m_ParentMatrix); - m_CTM.Copy(src.m_CTM); + m_TextMatrix = src.m_TextMatrix; + m_ParentMatrix = src.m_ParentMatrix; + m_CTM = src.m_CTM; m_TextX = src.m_TextX; m_TextY = src.m_TextY; m_TextLineX = src.m_TextLineX; diff --git a/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp index 83e66eae61..d7f1f3c3e0 100644 --- a/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp +++ b/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp @@ -777,8 +777,7 @@ CPDF_ImageObject* CPDF_StreamContentParser::AddImage(CPDF_Stream* pStream, if (!pStream && !pImage) return nullptr; - CFX_Matrix ImageMatrix; - ImageMatrix.Copy(m_pCurStates->m_CTM); + CFX_Matrix ImageMatrix = m_pCurStates->m_CTM; ImageMatrix.Concat(m_mtContentToUser); std::unique_ptr<CPDF_ImageObject> pImageObj(new CPDF_ImageObject); diff --git a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp index 7bfed906ea..fef0bcdb79 100644 --- a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp +++ b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp @@ -118,7 +118,7 @@ FX_BOOL CPDF_RenderStatus::ProcessText(CPDF_TextObject* textobj, if (pCTM[0] != 1.0f || pCTM[3] != 1.0f) { CFX_Matrix ctm(pCTM[0], pCTM[1], pCTM[2], pCTM[3], 0, 0); text_matrix.ConcatInverse(ctm); - device_matrix.Copy(ctm); + device_matrix = ctm; device_matrix.Concat(*pObj2Device); pDeviceMatrix = &device_matrix; } |