diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-07-26 19:06:06 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-07-26 19:06:06 +0000 |
commit | 4ef943b992782d930a7550b98e3d0389886a0ba3 (patch) | |
tree | bc063c260a73bc83fbbb77b9bce59d8d97f28965 /fpdfsdk/formfiller/cffl_checkbox.cpp | |
parent | 2daa06ab9596a42c967497c2bae16ddd902dcaf0 (diff) | |
download | pdfium-4ef943b992782d930a7550b98e3d0389886a0ba3.tar.xz |
Be more careful casting to widget subclasses.
Part of the effort to reduce unchecked static casts.
Change-Id: I1bff1c53aa7c5804660de4b65cf01523d70fcbb7
Reviewed-on: https://pdfium-review.googlesource.com/38896
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk/formfiller/cffl_checkbox.cpp')
-rw-r--r-- | fpdfsdk/formfiller/cffl_checkbox.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fpdfsdk/formfiller/cffl_checkbox.cpp b/fpdfsdk/formfiller/cffl_checkbox.cpp index e9c72efd39..57119c5c31 100644 --- a/fpdfsdk/formfiller/cffl_checkbox.cpp +++ b/fpdfsdk/formfiller/cffl_checkbox.cpp @@ -61,7 +61,7 @@ bool CFFL_CheckBox::OnChar(CPDFSDK_Annot* pAnnot, CPWL_CheckBox* pWnd = GetCheckBox(pPageView, true); if (pWnd) { - CPDFSDK_Widget* pWidget = static_cast<CPDFSDK_Widget*>(pAnnot); + CPDFSDK_Widget* pWidget = ToCPDFSDKWidget(pAnnot); pWnd->SetCheck(!pWidget->IsChecked()); } @@ -83,7 +83,7 @@ bool CFFL_CheckBox::OnLButtonUp(CPDFSDK_PageView* pPageView, CPWL_CheckBox* pWnd = GetCheckBox(pPageView, true); if (pWnd) { - CPDFSDK_Widget* pWidget = static_cast<CPDFSDK_Widget*>(pAnnot); + CPDFSDK_Widget* pWidget = ToCPDFSDKWidget(pAnnot); pWnd->SetCheck(!pWidget->IsChecked()); } |