Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1251)

Unified Diff: xfa/fwl/theme/cfwl_carettp.cpp

Issue 2263923003: Make CFX_Color constructor explicit (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comment Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | xfa/fwl/theme/cfwl_comboboxtp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/theme/cfwl_carettp.cpp
diff --git a/xfa/fwl/theme/cfwl_carettp.cpp b/xfa/fwl/theme/cfwl_carettp.cpp
index eb7323131706a696a993f50b7cb1b1c56d90ee93..b517172fffc19708f5e4c36474d606c10bb6bb18 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);
}
« no previous file with comments | « no previous file | xfa/fwl/theme/cfwl_comboboxtp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698