summaryrefslogtreecommitdiff
path: root/fpdfsdk/fsdk_mgr.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-04-21 12:09:41 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-21 12:09:41 -0700
commitdf964dfb34e648e27dce7bef785b204894a7058a (patch)
tree5b0e31ca677aad571fc1fbd67c0e5e57d21cdc03 /fpdfsdk/fsdk_mgr.cpp
parentd00a91229690e453cb7f2eed652d81e864b27d2a (diff)
downloadpdfium-df964dfb34e648e27dce7bef785b204894a7058a.tar.xz
Replace CFX_RectArray with std::vector<CFX_FloatRect>
Use RVO now that we use an array type compatible with it. Review URL: https://codereview.chromium.org/1906903002
Diffstat (limited to 'fpdfsdk/fsdk_mgr.cpp')
-rw-r--r--fpdfsdk/fsdk_mgr.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/fpdfsdk/fsdk_mgr.cpp b/fpdfsdk/fsdk_mgr.cpp
index 7240fe1d0b..cfb1b8a8b3 100644
--- a/fpdfsdk/fsdk_mgr.cpp
+++ b/fpdfsdk/fsdk_mgr.cpp
@@ -1158,12 +1158,10 @@ void CPDFSDK_PageView::ClearFXAnnots() {
SetLock(FALSE);
}
-void CPDFSDK_PageView::UpdateRects(CFX_RectArray& rects) {
- for (int i = 0; i < rects.GetSize(); i++) {
- CFX_FloatRect rc = rects.GetAt(i);
- CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
+void CPDFSDK_PageView::UpdateRects(const std::vector<CFX_FloatRect>& rects) {
+ CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
+ for (const auto& rc : rects)
pEnv->FFI_Invalidate(m_page, rc.left, rc.top, rc.right, rc.bottom);
- }
}
void CPDFSDK_PageView::UpdateView(CPDFSDK_Annot* pAnnot) {