summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_fftextedit.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 /xfa/fxfa/cxfa_fftextedit.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 'xfa/fxfa/cxfa_fftextedit.cpp')
-rw-r--r--xfa/fxfa/cxfa_fftextedit.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/xfa/fxfa/cxfa_fftextedit.cpp b/xfa/fxfa/cxfa_fftextedit.cpp
index d8de8a028f..520ed31ec5 100644
--- a/xfa/fxfa/cxfa_fftextedit.cpp
+++ b/xfa/fxfa/cxfa_fftextedit.cpp
@@ -305,9 +305,8 @@ void CXFA_FFTextEdit::OnTextChanged(CFWL_Widget* pWidget,
eParam.m_wsChange = wsChanged;
eParam.m_pTarget = m_pNode.Get();
eParam.m_wsPrevText = wsPrevText;
- CFWL_Edit* pEdit = ToEdit(m_pNormalWidget.get());
if (m_pNode->GetFFWidgetType() == XFA_FFWidgetType::kDateTimeEdit) {
- CFWL_DateTimePicker* pDateTime = (CFWL_DateTimePicker*)pEdit;
+ auto* pDateTime = static_cast<CFWL_DateTimePicker*>(m_pNormalWidget.get());
eParam.m_wsNewText = pDateTime->GetEditText();
if (pDateTime->HasSelection()) {
size_t count;
@@ -315,6 +314,7 @@ void CXFA_FFTextEdit::OnTextChanged(CFWL_Widget* pWidget,
eParam.m_iSelEnd = eParam.m_iSelStart + count;
}
} else {
+ CFWL_Edit* pEdit = ToEdit(m_pNormalWidget.get());
eParam.m_wsNewText = pEdit->GetText();
if (pEdit->HasSelection())
std::tie(eParam.m_iSelStart, eParam.m_iSelEnd) = pEdit->GetSelection();