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

Unified Diff: xfa/fwl/basewidget/fwl_monthcalendarimp.cpp

Issue 2207093005: Use smart pointers for class owned pointers (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: one more change 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 | « xfa/fwl/basewidget/fwl_monthcalendarimp.h ('k') | xfa/fwl/basewidget/fwl_tooltipctrlimp.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/basewidget/fwl_monthcalendarimp.cpp
diff --git a/xfa/fwl/basewidget/fwl_monthcalendarimp.cpp b/xfa/fwl/basewidget/fwl_monthcalendarimp.cpp
index ca141a2d7ad7b751726e3bd0cf878ce7f520132f..7477f04bdce530ed9bbaac6c454aa3bb1b66d6d8 100644
--- a/xfa/fwl/basewidget/fwl_monthcalendarimp.cpp
+++ b/xfa/fwl/basewidget/fwl_monthcalendarimp.cpp
@@ -151,6 +151,8 @@ CFWL_MonthCalendarImp::CFWL_MonthCalendarImp(
const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter)
: CFWL_WidgetImp(properties, pOuter),
+ m_bInit(FALSE),
+ m_pDateTime(new CFX_DateTime),
m_iCurYear(2011),
m_iCurMonth(1),
m_iYear(2011),
@@ -158,7 +160,8 @@ CFWL_MonthCalendarImp::CFWL_MonthCalendarImp(
m_iDay(1),
m_iHovered(-1),
m_iLBtnPartStates(CFWL_PartState_Normal),
- m_iRBtnPartStates(CFWL_PartState_Normal) {
+ m_iRBtnPartStates(CFWL_PartState_Normal),
+ m_iMaxSel(1) {
m_rtHead.Reset();
m_rtWeek.Reset();
m_rtLBtn.Reset();
@@ -171,14 +174,10 @@ CFWL_MonthCalendarImp::CFWL_MonthCalendarImp(
m_rtClient.Reset();
m_rtWeekNum.Reset();
m_rtWeekNumSep.Reset();
- m_pDateTime = new CFX_DateTime;
- m_bInit = FALSE;
- m_iMaxSel = 1;
}
CFWL_MonthCalendarImp::~CFWL_MonthCalendarImp() {
ClearDateItem();
- delete m_pDateTime;
m_arrSelDays.RemoveAll();
}
« no previous file with comments | « xfa/fwl/basewidget/fwl_monthcalendarimp.h ('k') | xfa/fwl/basewidget/fwl_tooltipctrlimp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698