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

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

Issue 1458173002: Fix CFWL_WidgetImpDelegate hierarchy. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 1 month 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/src/fwl/src/basewidget/fwl_caretimp.cpp
diff --git a/xfa/src/fwl/src/basewidget/fwl_caretimp.cpp b/xfa/src/fwl/src/basewidget/fwl_caretimp.cpp
index 856ca026213014284fe2dd3f68c6aa332d1a8f2e..cb40648b60ef996bc52205392c7ee65d7a6d13e3 100644
--- a/xfa/src/fwl/src/basewidget/fwl_caretimp.cpp
+++ b/xfa/src/fwl/src/basewidget/fwl_caretimp.cpp
@@ -69,7 +69,7 @@ FX_DWORD CFWL_CaretImp::GetClassID() const {
FWL_ERR CFWL_CaretImp::Initialize() {
_FWL_ERR_CHECK_RETURN_VALUE_IF_FAIL(CFWL_WidgetImp::Initialize(),
FWL_ERR_Indefinite);
- m_pDelegate = (IFWL_WidgetDelegate*)new CFWL_CaretImpDelegate(this);
+ m_pDelegate = new CFWL_CaretImpDelegate(this);
return FWL_ERR_Succeeded;
}
FWL_ERR CFWL_CaretImp::Finalize() {
@@ -77,10 +77,8 @@ FWL_ERR CFWL_CaretImp::Finalize() {
FWL_StopTimer(m_hTimer);
m_hTimer = NULL;
}
- if (m_pDelegate) {
- delete (CFWL_CaretImpDelegate*)m_pDelegate;
- m_pDelegate = NULL;
- }
+ delete m_pDelegate;
+ m_pDelegate = nullptr;
return CFWL_WidgetImp::Finalize();
}
FWL_ERR CFWL_CaretImp::DrawWidget(CFX_Graphics* pGraphics,

Powered by Google App Engine
This is Rietveld 408576698