summaryrefslogtreecommitdiff
path: root/xfa/src/fwl/src/basewidget/fwl_spinbuttonimp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/src/fwl/src/basewidget/fwl_spinbuttonimp.cpp')
-rw-r--r--xfa/src/fwl/src/basewidget/fwl_spinbuttonimp.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/xfa/src/fwl/src/basewidget/fwl_spinbuttonimp.cpp b/xfa/src/fwl/src/basewidget/fwl_spinbuttonimp.cpp
index cc87f51111..2b00584dd9 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) {