summaryrefslogtreecommitdiff
path: root/fpdfsdk/formfiller/cffl_listbox.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-04-26 18:33:58 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-26 18:33:58 +0000
commitea3a2529a7aa0199b385b7caa2e465c124eac8aa (patch)
treecf8beb27054209ef2b71222c3cdc81bd39192651 /fpdfsdk/formfiller/cffl_listbox.cpp
parentf9666864254bf84ef878630bbdaaaabbecab8ba5 (diff)
downloadpdfium-ea3a2529a7aa0199b385b7caa2e465c124eac8aa.tar.xz
Replace some c-style cast with static_cast<>
Change-Id: I9dd6a36770f77f3df6c4395572785d37402eadc2 Reviewed-on: https://pdfium-review.googlesource.com/31350 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/formfiller/cffl_listbox.cpp')
-rw-r--r--fpdfsdk/formfiller/cffl_listbox.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/fpdfsdk/formfiller/cffl_listbox.cpp b/fpdfsdk/formfiller/cffl_listbox.cpp
index 943412d509..bf24e116e5 100644
--- a/fpdfsdk/formfiller/cffl_listbox.cpp
+++ b/fpdfsdk/formfiller/cffl_listbox.cpp
@@ -81,7 +81,7 @@ bool CFFL_ListBox::OnChar(CPDFSDK_Annot* pAnnot,
}
bool CFFL_ListBox::IsDataChanged(CPDFSDK_PageView* pPageView) {
- CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, false);
+ auto* pListBox = static_cast<CPWL_ListBox*>(GetPDFWindow(pPageView, false));
if (!pListBox)
return false;
@@ -140,8 +140,9 @@ void CFFL_ListBox::GetActionData(CPDFSDK_PageView* pPageView,
if (m_pWidget->GetFieldFlags() & FIELDFLAG_MULTISELECT) {
fa.sValue = L"";
} else {
- if (CPWL_ListBox* pListBox =
- (CPWL_ListBox*)GetPDFWindow(pPageView, false)) {
+ auto* pListBox =
+ static_cast<CPWL_ListBox*>(GetPDFWindow(pPageView, false));
+ if (pListBox) {
int32_t nCurSel = pListBox->GetCurSel();
if (nCurSel >= 0)
fa.sValue = m_pWidget->GetOptionLabel(nCurSel);