summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/pdfwindow
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-02-29 13:23:13 -0800
committerTom Sepez <tsepez@chromium.org>2016-02-29 13:23:13 -0800
commitbec4ea1e64b8049c572dd088c9c09a94f49b2353 (patch)
tree14470b439a7f963beea6aff17c72ac3321dc2e0a /fpdfsdk/src/pdfwindow
parent3f157c7c6a5cdb92dd5df2a0b06c10ed83b472e8 (diff)
downloadpdfium-bec4ea1e64b8049c572dd088c9c09a94f49b2353.tar.xz
Pass rect by const reference in SetClip_Rect().
R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1745243002 .
Diffstat (limited to 'fpdfsdk/src/pdfwindow')
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_ListCtrl.cpp6
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Utils.cpp9
2 files changed, 5 insertions, 10 deletions
diff --git a/fpdfsdk/src/pdfwindow/PWL_ListCtrl.cpp b/fpdfsdk/src/pdfwindow/PWL_ListCtrl.cpp
index 1c32ceb251..7c2c1f4d17 100644
--- a/fpdfsdk/src/pdfwindow/PWL_ListCtrl.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_ListCtrl.cpp
@@ -141,10 +141,8 @@ void CPWL_ListCtrl::DrawChildAppearance(CFX_RenderDevice* pDevice,
CFX_FloatRect rcClient = GetClientRect();
CFX_FloatRect rcTemp = rcClient;
pUser2Device->TransformRect(rcTemp);
- FX_RECT rcClip((int32_t)rcTemp.left, (int32_t)rcTemp.bottom,
- (int32_t)rcTemp.right, (int32_t)rcTemp.top);
-
- pDevice->SetClip_Rect(&rcClip);
+ pDevice->SetClip_Rect(FX_RECT((int32_t)rcTemp.left, (int32_t)rcTemp.bottom,
+ (int32_t)rcTemp.right, (int32_t)rcTemp.top));
for (int32_t i = 0, sz = m_aChildren.GetSize(); i < sz; i++) {
if (CPWL_Wnd* pChild = m_aChildren.GetAt(i)) {
diff --git a/fpdfsdk/src/pdfwindow/PWL_Utils.cpp b/fpdfsdk/src/pdfwindow/PWL_Utils.cpp
index 6cd5786e2e..db1323e78a 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Utils.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Utils.cpp
@@ -1696,12 +1696,9 @@ void CPWL_Utils::DrawEditSpellCheck(CFX_RenderDevice* pDevice,
if (!rcClip.IsEmpty()) {
CFX_FloatRect rcTemp = rcClip;
pUser2Device->TransformRect(rcTemp);
- FX_RECT rcDevClip;
- rcDevClip.left = (int32_t)rcTemp.left;
- rcDevClip.right = (int32_t)rcTemp.right;
- rcDevClip.top = (int32_t)rcTemp.top;
- rcDevClip.bottom = (int32_t)rcTemp.bottom;
- pDevice->SetClip_Rect(&rcDevClip);
+ pDevice->SetClip_Rect(FX_RECT((int32_t)rcTemp.left, (int32_t)rcTemp.top,
+ (int32_t)rcTemp.right,
+ (int32_t)rcTemp.bottom));
}
if (IFX_Edit_Iterator* pIterator = pEdit->GetIterator()) {