summaryrefslogtreecommitdiff
path: root/xfa/fwl/basewidget/fwl_datetimepickerimp.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-04-27 15:28:25 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-27 15:28:25 -0700
commitb174aa37b6a99461dc581c63a93a1d706705dd16 (patch)
tree90167be30ea92203dfc48564af5c408cbcd1e4bd /xfa/fwl/basewidget/fwl_datetimepickerimp.cpp
parent590f2d9e057a0d5b17a9706affd3c6115265021b (diff)
downloadpdfium-b174aa37b6a99461dc581c63a93a1d706705dd16.tar.xz
Replace CFX_PtrArray with type-safe CFX_ArrayTemplate<>, Part 1.
Ideally, these will become std::vector<>, but in the mean time this is quicker and allow us to remove casts. Doing so has already turned up one place where the wrong type of object was being used. Review-Url: https://codereview.chromium.org/1924073002
Diffstat (limited to 'xfa/fwl/basewidget/fwl_datetimepickerimp.cpp')
-rw-r--r--xfa/fwl/basewidget/fwl_datetimepickerimp.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/xfa/fwl/basewidget/fwl_datetimepickerimp.cpp b/xfa/fwl/basewidget/fwl_datetimepickerimp.cpp
index c70ad691a4..94fa549fe4 100644
--- a/xfa/fwl/basewidget/fwl_datetimepickerimp.cpp
+++ b/xfa/fwl/basewidget/fwl_datetimepickerimp.cpp
@@ -311,11 +311,10 @@ void CFWL_DateTimeCalendarImpDelegate::OnLButtonUpEx(CFWL_MsgMouse* pMsg) {
pPicker->m_pForm->GetWidgetRect(rt);
rt.Set(0, 0, rt.width, rt.height);
if (iCurSel > 0) {
- FWL_DATEINFO* lpDatesInfo =
- (FWL_DATEINFO*)m_pOwner->m_arrDates.GetAt(iCurSel - 1);
+ FWL_DATEINFO* lpDatesInfo = m_pOwner->m_arrDates.GetAt(iCurSel - 1);
CFX_RectF rtInvalidate(lpDatesInfo->rect);
if (iOldSel > 0 && iOldSel <= m_pOwner->m_arrDates.GetSize()) {
- lpDatesInfo = (FWL_DATEINFO*)m_pOwner->m_arrDates.GetAt(iOldSel - 1);
+ lpDatesInfo = m_pOwner->m_arrDates.GetAt(iOldSel - 1);
rtInvalidate.Union(lpDatesInfo->rect);
}
m_pOwner->AddSelDay(iCurSel);
@@ -406,11 +405,10 @@ void CFWL_DateTimeCalendarImpDelegate::DisForm_OnLButtonUpEx(
}
int32_t iCurSel = m_pOwner->GetDayAtPoint(pMsg->m_fx, pMsg->m_fy);
if (iCurSel > 0) {
- FWL_DATEINFO* lpDatesInfo =
- (FWL_DATEINFO*)m_pOwner->m_arrDates.GetAt(iCurSel - 1);
+ FWL_DATEINFO* lpDatesInfo = m_pOwner->m_arrDates.GetAt(iCurSel - 1);
CFX_RectF rtInvalidate(lpDatesInfo->rect);
if (iOldSel > 0 && iOldSel <= m_pOwner->m_arrDates.GetSize()) {
- lpDatesInfo = (FWL_DATEINFO*)m_pOwner->m_arrDates.GetAt(iOldSel - 1);
+ lpDatesInfo = m_pOwner->m_arrDates.GetAt(iOldSel - 1);
rtInvalidate.Union(lpDatesInfo->rect);
}
m_pOwner->AddSelDay(iCurSel);