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

Unified Diff: xfa/fwl/cfwl_widgetmgr.cpp

Issue 2571913002: Avoid the ptr.reset(new XXX()) anti-pattern (Closed)
Patch Set: rebase Created 4 years 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 | « xfa/fwl/cfwl_datetimepicker.cpp ('k') | xfa/fwl/theme/cfwl_checkboxtp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/cfwl_widgetmgr.cpp
diff --git a/xfa/fwl/cfwl_widgetmgr.cpp b/xfa/fwl/cfwl_widgetmgr.cpp
index e7eca100cc165c724b37c5ca9e15e82f69e63e2b..7df7fb234d46cba97adaefa20b95dc1ccbdc5536 100644
--- a/xfa/fwl/cfwl_widgetmgr.cpp
+++ b/xfa/fwl/cfwl_widgetmgr.cpp
@@ -563,7 +563,7 @@ CFX_Graphics* CFWL_WidgetMgr::DrawWidgetBefore(CFWL_Widget* pWidget,
Item* pItem = GetWidgetMgrItem(pWidget);
if (!pItem->pOffscreen) {
- pItem->pOffscreen.reset(new CFX_Graphics);
+ pItem->pOffscreen = pdfium::MakeUnique<CFX_Graphics>();
CFX_RectF rect = pWidget->GetWidgetRect();
pItem->pOffscreen->Create((int32_t)rect.width, (int32_t)rect.height,
FXDIB_Argb);
« no previous file with comments | « xfa/fwl/cfwl_datetimepicker.cpp ('k') | xfa/fwl/theme/cfwl_checkboxtp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698