From d24236a926deeb8b9589c330c27dbd300b7f8c9d Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 29 Jun 2017 18:28:58 -0700 Subject: Remove pointless CFX_FloatRect construction. Also just call CFX_FloatRect() instead of explicitly writing out all zeros. Change-Id: I7574e64791d0c9ba613b14d0a613737dfbf39b12 Reviewed-on: https://pdfium-review.googlesource.com/7172 Reviewed-by: Ryan Harrison Commit-Queue: Lei Zhang --- core/fpdfapi/page/cpdf_pageobjectholder.cpp | 2 +- core/fpdfapi/page/cpdf_streamcontentparser.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'core/fpdfapi/page') diff --git a/core/fpdfapi/page/cpdf_pageobjectholder.cpp b/core/fpdfapi/page/cpdf_pageobjectholder.cpp index 614fa34d2b..2b7e62b535 100644 --- a/core/fpdfapi/page/cpdf_pageobjectholder.cpp +++ b/core/fpdfapi/page/cpdf_pageobjectholder.cpp @@ -55,7 +55,7 @@ void CPDF_PageObjectHolder::Transform(const CFX_Matrix& matrix) { CFX_FloatRect CPDF_PageObjectHolder::CalcBoundingBox() const { if (m_PageObjectList.empty()) - return CFX_FloatRect(0, 0, 0, 0); + return CFX_FloatRect(); float left = 1000000.0f; float right = -1000000.0f; diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.cpp b/core/fpdfapi/page/cpdf_streamcontentparser.cpp index 151b0e644e..e00dbc54fd 100644 --- a/core/fpdfapi/page/cpdf_streamcontentparser.cpp +++ b/core/fpdfapi/page/cpdf_streamcontentparser.cpp @@ -75,11 +75,11 @@ CFX_FloatRect GetShadingBBox(CPDF_ShadingPattern* pShading, CPDF_Stream* pStream = ToStream(pShading->GetShadingObject()); CPDF_ColorSpace* pCS = pShading->GetCS(); if (!pStream || !pCS) - return CFX_FloatRect(0, 0, 0, 0); + return CFX_FloatRect(); CPDF_MeshStream stream(type, pShading->GetFuncs(), pStream, pCS); if (!stream.Load()) - return CFX_FloatRect(0, 0, 0, 0); + return CFX_FloatRect(); CFX_FloatRect rect; bool bStarted = false; -- cgit v1.2.3