diff options
author | Wei Li <weili@chromium.org> | 2016-04-11 10:02:09 -0700 |
---|---|---|
committer | Wei Li <weili@chromium.org> | 2016-04-11 10:02:09 -0700 |
commit | e1aebd43b0c75133f94f8b141b33d12e2e715524 (patch) | |
tree | 863aded8c706db162eb3f69d6482100f9d61b842 /core/fpdfdoc/doc_annot.cpp | |
parent | 2d4a4fc372159ac7562abea48498b6ab72c2f321 (diff) | |
download | pdfium-e1aebd43b0c75133f94f8b141b33d12e2e715524.tar.xz |
Use std::vector as internal storage for CPDF_Array
Replace the usage of CFX_ArrayTemplate inside CPDF_Array, which
has non-standard APIs such as GetSize() returns int.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1867183002 .
Diffstat (limited to 'core/fpdfdoc/doc_annot.cpp')
-rw-r--r-- | core/fpdfdoc/doc_annot.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/fpdfdoc/doc_annot.cpp b/core/fpdfdoc/doc_annot.cpp index 1db37ccdb3..8650fbd23d 100644 --- a/core/fpdfdoc/doc_annot.cpp +++ b/core/fpdfdoc/doc_annot.cpp @@ -29,7 +29,7 @@ CPDF_AnnotList::CPDF_AnnotList(CPDF_Page* pPage) CPDF_Dictionary* pAcroForm = pRoot->GetDictBy("AcroForm"); FX_BOOL bRegenerateAP = pAcroForm && pAcroForm->GetBooleanBy("NeedAppearances"); - for (uint32_t i = 0; i < pAnnots->GetCount(); ++i) { + for (size_t i = 0; i < pAnnots->GetCount(); ++i) { CPDF_Dictionary* pDict = ToDictionary(pAnnots->GetDirectObjectAt(i)); if (!pDict) continue; @@ -286,8 +286,8 @@ void CPDF_Annot::DrawBorder(CFX_RenderDevice* pDevice, if (!pDashArray) { return; } - int nLen = pDashArray->GetCount(); - int i = 0; + size_t nLen = pDashArray->GetCount(); + size_t i = 0; for (; i < nLen; ++i) { CPDF_Object* pObj = pDashArray->GetDirectObjectAt(i); if (pObj && pObj->GetInteger()) { @@ -323,13 +323,13 @@ void CPDF_Annot::DrawBorder(CFX_RenderDevice* pDevice, graph_state.m_LineWidth = width; if (style_char == 'D') { if (pDashArray) { - uint32_t dash_count = pDashArray->GetCount(); + size_t dash_count = pDashArray->GetCount(); if (dash_count % 2) { dash_count++; } graph_state.m_DashArray = FX_Alloc(FX_FLOAT, dash_count); graph_state.m_DashCount = dash_count; - uint32_t i; + size_t i; for (i = 0; i < pDashArray->GetCount(); ++i) { graph_state.m_DashArray[i] = pDashArray->GetNumberAt(i); } |