summaryrefslogtreecommitdiff
path: root/xfa/fwl/theme/cfwl_carettp.cpp
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-08-22 13:37:04 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-22 13:37:04 -0700
commit9b99ebf5159d98cc83fb2e8ebac6750e158841d6 (patch)
treefd8fa25abf4be216e50d62dfce8cfc694efc3a97 /xfa/fwl/theme/cfwl_carettp.cpp
parent28a4a2410f24910c709578d981cae3bb8153fdba (diff)
downloadpdfium-9b99ebf5159d98cc83fb2e8ebac6750e158841d6.tar.xz
Make CFX_Color constructor explicit
Change the places which require implicit construction, and make the construction from ARGB_Color explicit. Review-Url: https://codereview.chromium.org/2263923003
Diffstat (limited to 'xfa/fwl/theme/cfwl_carettp.cpp')
-rw-r--r--xfa/fwl/theme/cfwl_carettp.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/xfa/fwl/theme/cfwl_carettp.cpp b/xfa/fwl/theme/cfwl_carettp.cpp
index eb73231317..b517172fff 100644
--- a/xfa/fwl/theme/cfwl_carettp.cpp
+++ b/xfa/fwl/theme/cfwl_carettp.cpp
@@ -44,10 +44,13 @@ void CFWL_CaretTP::DrawCaretBK(CFX_Graphics* pGraphics,
CFX_Matrix* pMatrix) {
CFX_Path path;
path.Create();
- CFX_Color crFilltemp;
- crFill ? crFilltemp = *crFill : crFilltemp = ArgbEncode(255, 0, 0, 0);
CFX_RectF rect = *pRect;
path.AddRectangle(rect.left, rect.top, rect.width, rect.height);
- pGraphics->SetFillColor(&crFilltemp);
+ if (crFill) {
+ pGraphics->SetFillColor(crFill);
+ } else {
+ CFX_Color crFilltemp(ArgbEncode(255, 0, 0, 0));
+ pGraphics->SetFillColor(&crFilltemp);
+ }
pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix);
}