Chromium Code Reviews| Index: xfa/src/fwl/src/basewidget/fwl_barcodeimp.cpp |
| diff --git a/xfa/src/fwl/src/basewidget/fwl_barcodeimp.cpp b/xfa/src/fwl/src/basewidget/fwl_barcodeimp.cpp |
| index c65a35064561b00fb1a007ccc0d3c5ee334f5eaa..5544162380ba6e4f2c2386a055efcae55c648657 100644 |
| --- a/xfa/src/fwl/src/basewidget/fwl_barcodeimp.cpp |
| +++ b/xfa/src/fwl/src/basewidget/fwl_barcodeimp.cpp |
| @@ -51,17 +51,15 @@ FX_DWORD CFWL_BarcodeImp::GetClassID() const { |
| } |
| FWL_ERR CFWL_BarcodeImp::Initialize() { |
| if (!m_pDelegate) { |
| - m_pDelegate = (IFWL_WidgetDelegate*)new CFWL_BarcodeImpDelegate(this); |
|
Lei Zhang
2015/11/20 03:11:43
Ya, umm, wow.
|
| + m_pDelegate = new CFWL_BarcodeImpDelegate(this); |
| } |
| _FWL_ERR_CHECK_RETURN_VALUE_IF_FAIL(CFWL_EditImp::Initialize(), |
| FWL_ERR_Indefinite); |
| return FWL_ERR_Succeeded; |
| } |
| FWL_ERR CFWL_BarcodeImp::Finalize() { |
| - if (m_pDelegate) { |
| - delete (CFWL_BarcodeImpDelegate*)m_pDelegate; |
| - m_pDelegate = NULL; |
| - } |
| + delete m_pDelegate; |
| + m_pDelegate = nullptr; |
| ReleaseBarcodeEngine(); |
| return CFWL_EditImp::Finalize(); |
| } |