From d18b8674378b104a9b5bb1f015e3f92fc174673e Mon Sep 17 00:00:00 2001 From: tsepez Date: Tue, 10 Jan 2017 10:19:04 -0800 Subject: Remove some CFX_ArrayTemplate in fpdfapi and fpdfdoc Also use unique_ptr in one spot while we're at it. Review-Url: https://codereview.chromium.org/2625483002 --- core/fpdfapi/parser/cpdf_parser.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/fpdfapi/parser') diff --git a/core/fpdfapi/parser/cpdf_parser.cpp b/core/fpdfapi/parser/cpdf_parser.cpp index 62364c0a75..f9d9eb3a97 100644 --- a/core/fpdfapi/parser/cpdf_parser.cpp +++ b/core/fpdfapi/parser/cpdf_parser.cpp @@ -986,14 +986,14 @@ bool CPDF_Parser::LoadCrossRefV5(FX_FILESIZE* pos, bool bMainXRef) { if (!pArray) return false; - CFX_ArrayTemplate WidthArray; + std::vector WidthArray; FX_SAFE_UINT32 dwAccWidth = 0; for (size_t i = 0; i < pArray->GetCount(); ++i) { - WidthArray.Add(pArray->GetIntegerAt(i)); + WidthArray.push_back(pArray->GetIntegerAt(i)); dwAccWidth += WidthArray[i]; } - if (!dwAccWidth.IsValid() || WidthArray.GetSize() < 3) + if (!dwAccWidth.IsValid() || WidthArray.size() < 3) return false; uint32_t totalWidth = dwAccWidth.ValueOrDie(); -- cgit v1.2.3