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

Unified Diff: xfa/src/fwl/src/basewidget/fwl_barcodeimp.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_barcodeimp.cpp
diff --git a/xfa/src/fwl/src/basewidget/fwl_barcodeimp.cpp b/xfa/src/fwl/src/basewidget/fwl_barcodeimp.cpp
index 342118e0a124cfdcaabfde0612a8035bd008bee1..b0addafe1345fa8f627c4be16b9eb84077ebbe9a 100644
--- a/xfa/src/fwl/src/basewidget/fwl_barcodeimp.cpp
+++ b/xfa/src/fwl/src/basewidget/fwl_barcodeimp.cpp
@@ -14,30 +14,25 @@ IFWL_Barcode* IFWL_Barcode::Create() {
return new IFWL_Barcode;
}
IFWL_Barcode::IFWL_Barcode() {
- m_pImpl = NULL;
-}
-IFWL_Barcode::~IFWL_Barcode() {
- if (m_pImpl) {
- delete (CFWL_BarcodeImp*)m_pImpl;
- m_pImpl = NULL;
- }
}
FWL_ERR IFWL_Barcode::Initialize(IFWL_Widget* pOuter) {
- m_pImpl = new CFWL_BarcodeImp(pOuter);
- ((CFWL_BarcodeImp*)m_pImpl)->SetInterface(this);
- return ((CFWL_BarcodeImp*)m_pImpl)->Initialize();
+ CFWL_BarcodeImp* pBarcodeImpl = new CFWL_BarcodeImp(pOuter);
+ SetImpl(pBarcodeImpl);
+ pBarcodeImpl->SetInterface(this);
+ return pBarcodeImpl->Initialize();
}
FWL_ERR IFWL_Barcode::Initialize(const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter) {
- m_pImpl = new CFWL_BarcodeImp(properties, pOuter);
- ((CFWL_BarcodeImp*)m_pImpl)->SetInterface(this);
- return ((CFWL_BarcodeImp*)m_pImpl)->Initialize();
+ CFWL_BarcodeImp* pBarcodeImpl = new CFWL_BarcodeImp(properties, pOuter);
+ SetImpl(pBarcodeImpl);
+ pBarcodeImpl->SetInterface(this);
+ return pBarcodeImpl->Initialize();
}
void IFWL_Barcode::SetType(BC_TYPE type) {
- ((CFWL_BarcodeImp*)m_pImpl)->SetType(type);
+ static_cast<CFWL_BarcodeImp*>(GetImpl())->SetType(type);
}
FX_BOOL IFWL_Barcode::IsProtectedType() {
- return ((CFWL_BarcodeImp*)m_pImpl)->IsProtectedType();
+ return static_cast<CFWL_BarcodeImp*>(GetImpl())->IsProtectedType();
}
CFWL_BarcodeImp::CFWL_BarcodeImp(IFWL_Widget* pOuter)
: CFWL_EditImp(pOuter),

Powered by Google App Engine
This is Rietveld 408576698