Index: xfa/src/fwl/src/basewidget/fwl_spinbuttonimp.cpp |
diff --git a/xfa/src/fwl/src/basewidget/fwl_spinbuttonimp.cpp b/xfa/src/fwl/src/basewidget/fwl_spinbuttonimp.cpp |
index cc87f51111eda08192d3733b013a5bccfb1b9247..2b00584dd9585520512d54b02eb1f6f26787da15 100644 |
--- a/xfa/src/fwl/src/basewidget/fwl_spinbuttonimp.cpp |
+++ b/xfa/src/fwl/src/basewidget/fwl_spinbuttonimp.cpp |
@@ -68,14 +68,12 @@ FX_DWORD CFWL_SpinButtonImp::GetClassID() const { |
FWL_ERR CFWL_SpinButtonImp::Initialize() { |
_FWL_ERR_CHECK_RETURN_VALUE_IF_FAIL(CFWL_WidgetImp::Initialize(), |
FWL_ERR_Indefinite); |
- m_pDelegate = (IFWL_WidgetDelegate*)new CFWL_SpinButtonImpDelegate(this); |
+ m_pDelegate = new CFWL_SpinButtonImpDelegate(this); |
return FWL_ERR_Succeeded; |
} |
FWL_ERR CFWL_SpinButtonImp::Finalize() { |
- if (m_pDelegate) { |
- delete (CFWL_SpinButtonImpDelegate*)m_pDelegate; |
- m_pDelegate = NULL; |
- } |
+ delete m_pDelegate; |
+ m_pDelegate = nullptr; |
return CFWL_WidgetImp::Finalize(); |
} |
FWL_ERR CFWL_SpinButtonImp::GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize) { |