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

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

Issue 2207093005: Use smart pointers for class owned pointers (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: small fix 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
Index: xfa/fwl/basewidget/fwl_caretimp.cpp
diff --git a/xfa/fwl/basewidget/fwl_caretimp.cpp b/xfa/fwl/basewidget/fwl_caretimp.cpp
index dbe8e50bc2c4c41572b2f3e1f5038327f46c4924..cd51bd7430f8c95e74f292a51eb3df427b094e51 100644
--- a/xfa/fwl/basewidget/fwl_caretimp.cpp
+++ b/xfa/fwl/basewidget/fwl_caretimp.cpp
@@ -38,16 +38,14 @@ FWL_Error IFWL_Caret::SetColor(CFX_Color crFill) {
CFWL_CaretImp::CFWL_CaretImp(const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter)
: CFWL_WidgetImp(properties, pOuter),
+ m_pTimer(new CFWL_CaretTimer(this)),
m_pTimerInfo(nullptr),
m_dwElapse(400),
m_bSetColor(FALSE) {
- m_pTimer = new CFWL_CaretTimer(this);
SetStates(FWL_STATE_CAT_HightLight);
}
-CFWL_CaretImp::~CFWL_CaretImp() {
- delete m_pTimer;
-}
+CFWL_CaretImp::~CFWL_CaretImp() {}
FWL_Error CFWL_CaretImp::GetClassName(CFX_WideString& wsClass) const {
wsClass = FWL_CLASS_Caret;

Powered by Google App Engine
This is Rietveld 408576698