diff options
author | jaepark <jaepark@google.com> | 2016-08-25 13:33:34 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-25 13:33:34 -0700 |
commit | a1d2111945acb35cb3403226e68a1920910fa23e (patch) | |
tree | f8e0dafb97832a0cad15adc50c9b55c0d5b0c48a /fpdfsdk/fsdk_mgr.cpp | |
parent | d99a833da49272ee487293177f62274f58762033 (diff) | |
download | pdfium-a1d2111945acb35cb3403226e68a1920910fa23e.tar.xz |
CPDF_Annot::GetRect() should return CFX_FloatRect.
Avoid using reference argument and return CFX_FloatRect instead.
Review-Url: https://codereview.chromium.org/2278153005
Diffstat (limited to 'fpdfsdk/fsdk_mgr.cpp')
-rw-r--r-- | fpdfsdk/fsdk_mgr.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fpdfsdk/fsdk_mgr.cpp b/fpdfsdk/fsdk_mgr.cpp index 24efd4077d..9017e20b32 100644 --- a/fpdfsdk/fsdk_mgr.cpp +++ b/fpdfsdk/fsdk_mgr.cpp @@ -576,8 +576,7 @@ void CPDFSDK_PageView::PageView_OnDraw(CFX_RenderDevice* pDevice, const CPDF_Annot* CPDFSDK_PageView::GetPDFAnnotAtPoint(FX_FLOAT pageX, FX_FLOAT pageY) { for (const auto& pAnnot : m_pAnnotList->All()) { - CFX_FloatRect annotRect; - pAnnot->GetRect(annotRect); + CFX_FloatRect annotRect = pAnnot->GetRect(); if (annotRect.Contains(pageX, pageY)) return pAnnot.get(); } @@ -588,8 +587,7 @@ const CPDF_Annot* CPDFSDK_PageView::GetPDFWidgetAtPoint(FX_FLOAT pageX, FX_FLOAT pageY) { for (const auto& pAnnot : m_pAnnotList->All()) { if (pAnnot->GetSubType() == "Widget") { - CFX_FloatRect annotRect; - pAnnot->GetRect(annotRect); + CFX_FloatRect annotRect = pAnnot->GetRect(); if (annotRect.Contains(pageX, pageY)) return pAnnot.get(); } |