summaryrefslogtreecommitdiff
path: root/xfa/fwl/theme/cfwl_widgettp.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-08-20 19:10:17 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-20 19:10:17 +0000
commit9273e0674ecf87929696ca89cbf16371edabc315 (patch)
tree1b26f0c638a7252e8b1dfc961c6ec09d50fb546b /xfa/fwl/theme/cfwl_widgettp.cpp
parentf6144d4ab76e6357bd8d228ddf542ef4fb3fa3b0 (diff)
downloadpdfium-9273e0674ecf87929696ca89cbf16371edabc315.tar.xz
Clean up CXFA_Graphics::SetLineDash().
Fix some nits in CXFA_FFField as well. Change-Id: I6d0d4569322a01192cdd4bf9d98325ff86642abe Reviewed-on: https://pdfium-review.googlesource.com/40651 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'xfa/fwl/theme/cfwl_widgettp.cpp')
-rw-r--r--xfa/fwl/theme/cfwl_widgettp.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/xfa/fwl/theme/cfwl_widgettp.cpp b/xfa/fwl/theme/cfwl_widgettp.cpp
index 0f67b89715..49365ac9ac 100644
--- a/xfa/fwl/theme/cfwl_widgettp.cpp
+++ b/xfa/fwl/theme/cfwl_widgettp.cpp
@@ -143,12 +143,12 @@ void CFWL_WidgetTP::DrawFocus(CXFA_Graphics* pGraphics,
if (!pGraphics || !pRect)
return;
- float DashPattern[2] = {1, 1};
CXFA_GEPath path;
path.AddRectangle(pRect->left, pRect->top, pRect->width, pRect->height);
pGraphics->SaveGraphState();
pGraphics->SetStrokeColor(CXFA_GEColor(0xFF000000));
- pGraphics->SetLineDash(0.0f, DashPattern, 2);
+ static constexpr float kDashPattern[2] = {1, 1};
+ pGraphics->SetLineDash(0.0f, kDashPattern, FX_ArraySize(kDashPattern));
pGraphics->StrokePath(&path, pMatrix);
pGraphics->RestoreGraphState();
}