From 9b99ebf5159d98cc83fb2e8ebac6750e158841d6 Mon Sep 17 00:00:00 2001 From: weili Date: Mon, 22 Aug 2016 13:37:04 -0700 Subject: 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 --- xfa/fwl/theme/cfwl_carettp.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'xfa/fwl/theme/cfwl_carettp.cpp') 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); } -- cgit v1.2.3