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 /fpdfsdk/fsdk_baseannot.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 'fpdfsdk/fsdk_baseannot.cpp')
-rw-r--r-- | fpdfsdk/fsdk_baseannot.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fpdfsdk/fsdk_baseannot.cpp b/fpdfsdk/fsdk_baseannot.cpp index 68d99e8ae5..51f87d8c4e 100644 --- a/fpdfsdk/fsdk_baseannot.cpp +++ b/fpdfsdk/fsdk_baseannot.cpp @@ -739,9 +739,8 @@ void CPDFSDK_BAAnnot::SetBorderDash(const CFX_IntArray& array) { } CPDF_Array* pArray = new CPDF_Array; - for (int i = 0, sz = array.GetSize(); i < sz; i++) { + for (size_t i = 0, sz = array.GetSize(); i < sz; i++) pArray->AddInteger(array[i]); - } pBSDict->SetAt("D", pArray); } @@ -760,9 +759,8 @@ void CPDFSDK_BAAnnot::GetBorderDash(CFX_IntArray& array) const { } if (pDash) { - for (int i = 0, sz = pDash->GetCount(); i < sz; i++) { + for (size_t i = 0, sz = pDash->GetCount(); i < sz; i++) array.Add(pDash->GetIntegerAt(i)); - } } } @@ -780,7 +778,7 @@ void CPDFSDK_BAAnnot::RemoveColor() { FX_BOOL CPDFSDK_BAAnnot::GetColor(FX_COLORREF& color) const { if (CPDF_Array* pEntry = m_pAnnot->GetAnnotDict()->GetArrayBy("C")) { - int nCount = pEntry->GetCount(); + size_t nCount = pEntry->GetCount(); if (nCount == 1) { FX_FLOAT g = pEntry->GetNumberAt(0) * 255; |