summaryrefslogtreecommitdiff
path: root/fpdfsdk/pdfwindow/PWL_Wnd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/pdfwindow/PWL_Wnd.cpp')
-rw-r--r--fpdfsdk/pdfwindow/PWL_Wnd.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/fpdfsdk/pdfwindow/PWL_Wnd.cpp b/fpdfsdk/pdfwindow/PWL_Wnd.cpp
index e680652bb3..4a479de0dc 100644
--- a/fpdfsdk/pdfwindow/PWL_Wnd.cpp
+++ b/fpdfsdk/pdfwindow/PWL_Wnd.cpp
@@ -80,15 +80,13 @@ void CPWL_Timer::TimerProc(int32_t idEvent) {
pTimer->m_pAttached->TimerProc();
}
-CPWL_TimerHandler::CPWL_TimerHandler() : m_pTimer(nullptr) {}
+CPWL_TimerHandler::CPWL_TimerHandler() {}
-CPWL_TimerHandler::~CPWL_TimerHandler() {
- delete m_pTimer;
-}
+CPWL_TimerHandler::~CPWL_TimerHandler() {}
void CPWL_TimerHandler::BeginTimer(int32_t nElapse) {
if (!m_pTimer)
- m_pTimer = new CPWL_Timer(this, GetSystemHandler());
+ m_pTimer.reset(new CPWL_Timer(this, GetSystemHandler()));
if (m_pTimer)
m_pTimer->SetPWLTimer(nElapse);