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

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

Issue 1460883002: Make IFWL_Target::m_pImpl a private member. (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_pushbuttonimp.cpp
diff --git a/xfa/src/fwl/src/basewidget/fwl_pushbuttonimp.cpp b/xfa/src/fwl/src/basewidget/fwl_pushbuttonimp.cpp
index 6ae0a334c3425fc0e744d2505536b10d6659c48c..c8f986d4f8ae10dc057e606f07c41e08d2ee666c 100644
--- a/xfa/src/fwl/src/basewidget/fwl_pushbuttonimp.cpp
+++ b/xfa/src/fwl/src/basewidget/fwl_pushbuttonimp.cpp
@@ -13,24 +13,20 @@ IFWL_PushButton* IFWL_PushButton::Create() {
return new IFWL_PushButton;
}
FWL_ERR IFWL_PushButton::Initialize(IFWL_Widget* pOuter) {
- m_pImpl = new CFWL_PushButtonImp(pOuter);
- ((CFWL_PushButtonImp*)m_pImpl)->SetInterface(this);
- return ((CFWL_PushButtonImp*)m_pImpl)->Initialize();
+ CFWL_PushButtonImp* pPushButtonImpl = new CFWL_PushButtonImp(pOuter);
+ SetImpl(pPushButtonImpl);
+ pPushButtonImpl->SetInterface(this);
+ return pPushButtonImpl->Initialize();
}
FWL_ERR IFWL_PushButton::Initialize(const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter) {
- m_pImpl = new CFWL_PushButtonImp(properties, pOuter);
- ((CFWL_PushButtonImp*)m_pImpl)->SetInterface(this);
- return ((CFWL_PushButtonImp*)m_pImpl)->Initialize();
+ CFWL_PushButtonImp* pPushButtonImpl =
+ new CFWL_PushButtonImp(properties, pOuter);
+ SetImpl(pPushButtonImpl);
+ pPushButtonImpl->SetInterface(this);
+ return pPushButtonImpl->Initialize();
}
IFWL_PushButton::IFWL_PushButton() {
- m_pImpl = NULL;
-}
-IFWL_PushButton::~IFWL_PushButton() {
- if (m_pImpl) {
- delete (CFWL_PushButtonImp*)m_pImpl;
- m_pImpl = NULL;
- }
}
CFWL_PushButtonImp::CFWL_PushButtonImp(IFWL_Widget* pOuter)
: CFWL_WidgetImp(pOuter),

Powered by Google App Engine
This is Rietveld 408576698