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

Unified Diff: xfa/src/fwl/src/lightwidget/checkbox.cpp

Issue 1508883003: Replace more static casts in FWL (part 3) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years 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/lightwidget/checkbox.cpp
diff --git a/xfa/src/fwl/src/lightwidget/checkbox.cpp b/xfa/src/fwl/src/lightwidget/checkbox.cpp
index 7ec0c515bd6beb2f12989427dd9b3d749953a764..952c565ba703e818f6485f46d92e7730f3c63370 100644
--- a/xfa/src/fwl/src/lightwidget/checkbox.cpp
+++ b/xfa/src/fwl/src/lightwidget/checkbox.cpp
@@ -27,8 +27,9 @@ FWL_ERR CFWL_CheckBox::Initialize(const CFWL_WidgetProperties* pProperties) {
if (m_pProperties->m_pOwner) {
prop.m_pOwner = m_pProperties->m_pOwner->GetWidget();
}
- m_pIface = IFWL_CheckBox::Create();
- FWL_ERR ret = ((IFWL_CheckBox*)m_pIface)->Initialize(prop, nullptr);
+ IFWL_CheckBox* pCheckBox = IFWL_CheckBox::Create();
+ m_pIface = pCheckBox;
+ FWL_ERR ret = pCheckBox->Initialize(prop, nullptr);
if (ret == FWL_ERR_Succeeded) {
CFWL_Widget::Initialize();
}
@@ -43,10 +44,10 @@ FWL_ERR CFWL_CheckBox::SetBoxSize(FX_FLOAT fHeight) {
return FWL_ERR_Succeeded;
}
int32_t CFWL_CheckBox::GetCheckState() {
- return ((IFWL_CheckBox*)m_pIface)->GetCheckState();
+ return static_cast<IFWL_CheckBox*>(m_pIface)->GetCheckState();
}
FWL_ERR CFWL_CheckBox::SetCheckState(int32_t iCheck) {
- return ((IFWL_CheckBox*)m_pIface)->SetCheckState(iCheck);
+ return static_cast<IFWL_CheckBox*>(m_pIface)->SetCheckState(iCheck);
}
CFWL_CheckBox::CFWL_CheckBox() {}
CFWL_CheckBox::~CFWL_CheckBox() {}

Powered by Google App Engine
This is Rietveld 408576698