diff options
Diffstat (limited to 'xfa/src/fwl/src/basewidget/fwl_editimp.cpp')
-rw-r--r-- | xfa/src/fwl/src/basewidget/fwl_editimp.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/xfa/src/fwl/src/basewidget/fwl_editimp.cpp b/xfa/src/fwl/src/basewidget/fwl_editimp.cpp index 9f0dfa058a..07fec7f032 100644 --- a/xfa/src/fwl/src/basewidget/fwl_editimp.cpp +++ b/xfa/src/fwl/src/basewidget/fwl_editimp.cpp @@ -238,7 +238,7 @@ FWL_ERR CFWL_EditImp::Initialize() { _FWL_ERR_CHECK_RETURN_VALUE_IF_FAIL(CFWL_WidgetImp::Initialize(),
FWL_ERR_Indefinite);
if (!m_pDelegate) {
- m_pDelegate = (IFWL_WidgetDelegate*)new CFWL_EditImpDelegate(this);
+ m_pDelegate = new CFWL_EditImpDelegate(this);
}
InitCaret();
if (!m_pEdtEngine) {
@@ -256,10 +256,8 @@ FWL_ERR CFWL_EditImp::Finalize() { if (m_pVertScrollBar) {
m_pVertScrollBar->Finalize();
}
- if (m_pDelegate) {
- delete (CFWL_EditImpDelegate*)m_pDelegate;
- m_pDelegate = NULL;
- }
+ delete m_pDelegate;
+ m_pDelegate = nullptr;
return CFWL_WidgetImp::Finalize();
}
FWL_ERR CFWL_EditImp::GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize) {
|