diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-01-30 14:49:24 -0800 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-01-31 00:42:43 +0000 |
commit | 51d02b341dd56f8e365444cb9e4af7e0ffe55ae5 (patch) | |
tree | 616f11f803bc067eecc2c2c94684b3062a190221 /xfa/fxfa/app/xfa_ffdocview.cpp | |
parent | 02d83e1f963f56f61de670161e12ffb131c56d7b (diff) | |
download | pdfium-51d02b341dd56f8e365444cb9e4af7e0ffe55ae5.tar.xz |
use std::vector in cfx_graphics.h and xfa_ffwidget.h
Change-Id: I19f2e729b58de42506e8fc2811dd06d406470314
Reviewed-on: https://pdfium-review.googlesource.com/2470
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/app/xfa_ffdocview.cpp')
-rw-r--r-- | xfa/fxfa/app/xfa_ffdocview.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/xfa/fxfa/app/xfa_ffdocview.cpp b/xfa/fxfa/app/xfa_ffdocview.cpp index bf91baf082..0aedeed231 100644 --- a/xfa/fxfa/app/xfa_ffdocview.cpp +++ b/xfa/fxfa/app/xfa_ffdocview.cpp @@ -636,11 +636,12 @@ void CXFA_FFDocView::AddCalculateWidgetAcc(CXFA_WidgetAcc* pWidgetAcc) { } void CXFA_FFDocView::AddCalculateNodeNotify(CXFA_Node* pNodeChange) { - CXFA_CalcData* pGlobalData = - (CXFA_CalcData*)pNodeChange->GetUserData(XFA_CalcData); - int32_t iCount = pGlobalData ? pGlobalData->m_Globals.GetSize() : 0; - for (int32_t i = 0; i < iCount; i++) { - CXFA_WidgetAcc* pResultAcc = pGlobalData->m_Globals[i]; + auto pGlobalData = + static_cast<CXFA_CalcData*>(pNodeChange->GetUserData(XFA_CalcData)); + if (!pGlobalData) + return; + + for (const auto& pResultAcc : pGlobalData->m_Globals) { if (!pResultAcc->GetNode()->HasRemovedChildren()) AddCalculateWidgetAcc(pResultAcc); } |