From 1b4f6b36b3ed8d1f6cea96bc32c1b376f4a499bc Mon Sep 17 00:00:00 2001 From: weili Date: Thu, 4 Aug 2016 16:37:48 -0700 Subject: Use smart pointers for class owned pointers For classes under xfa/fgas, xfa/fwl/basewidget, and xfa/fwl/core, use smart pointers instead of raw pointer to make memory management easier. BUG=pdfium:518 Review-Url: https://codereview.chromium.org/2207093005 --- xfa/fwl/basewidget/fwl_monthcalendarimp.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xfa/fwl/basewidget/fwl_monthcalendarimp.h') diff --git a/xfa/fwl/basewidget/fwl_monthcalendarimp.h b/xfa/fwl/basewidget/fwl_monthcalendarimp.h index db6ce7801c..2716f59f95 100644 --- a/xfa/fwl/basewidget/fwl_monthcalendarimp.h +++ b/xfa/fwl/basewidget/fwl_monthcalendarimp.h @@ -7,6 +7,8 @@ #ifndef XFA_FWL_BASEWIDGET_FWL_MONTHCALENDARIMP_H_ #define XFA_FWL_BASEWIDGET_FWL_MONTHCALENDARIMP_H_ +#include + #include "xfa/fgas/localization/fgas_datetime.h" #include "xfa/fwl/core/fwl_widgetimp.h" #include "xfa/fwl/core/ifwl_widget.h" @@ -164,7 +166,7 @@ class CFWL_MonthCalendarImp : public CFWL_WidgetImp { CFX_RectF m_rtTemp; CFX_WideString m_wsHead; CFX_WideString m_wsToday; - CFX_DateTime* m_pDateTime; + std::unique_ptr m_pDateTime; CFX_ArrayTemplate m_arrDates; int32_t m_iCurYear; int32_t m_iCurMonth; -- cgit v1.2.3