From 0fa471794a88b262f9114b973d74b1c33e4e592b Mon Sep 17 00:00:00 2001 From: tsepez Date: Mon, 9 Jan 2017 07:01:36 -0800 Subject: Remove CFX_ArrayTemplate from fpdfapi Review-Url: https://codereview.chromium.org/2611413002 --- core/fpdfapi/font/fpdf_font_cid.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'core/fpdfapi/font/fpdf_font_cid.cpp') diff --git a/core/fpdfapi/font/fpdf_font_cid.cpp b/core/fpdfapi/font/fpdf_font_cid.cpp index 02f8f7f058..010c94ced2 100644 --- a/core/fpdfapi/font/fpdf_font_cid.cpp +++ b/core/fpdfapi/font/fpdf_font_cid.cpp @@ -15,6 +15,7 @@ #include "core/fpdfapi/parser/cpdf_simple_parser.h" #include "core/fxcrt/fx_ext.h" #include "core/fxge/fx_freetype.h" +#include "third_party/base/stl_util.h" namespace { @@ -403,14 +404,14 @@ void CPDF_CMapParser::ParseWord(const CFX_ByteStringC& word) { m_Status = 0; } else if (m_Status == 7) { if (word == "endcodespacerange") { - int nSegs = m_CodeRanges.GetSize(); + uint32_t nSegs = pdfium::CollectionSize(m_CodeRanges); if (nSegs > 1) { m_pCMap->m_CodingScheme = CPDF_CMap::MixedFourBytes; m_pCMap->m_nCodeRanges = nSegs; FX_Free(m_pCMap->m_pLeadingBytes); m_pCMap->m_pLeadingBytes = FX_Alloc2D(uint8_t, nSegs, sizeof(CMap_CodeRange)); - FXSYS_memcpy(m_pCMap->m_pLeadingBytes, m_CodeRanges.GetData(), + FXSYS_memcpy(m_pCMap->m_pLeadingBytes, m_CodeRanges.data(), nSegs * sizeof(CMap_CodeRange)); } else if (nSegs == 1) { m_pCMap->m_CodingScheme = (m_CodeRanges[0].m_CharSize == 2) @@ -424,9 +425,8 @@ void CPDF_CMapParser::ParseWord(const CFX_ByteStringC& word) { } if (m_CodeSeq % 2) { CMap_CodeRange range; - if (CMap_GetCodeRange(range, m_LastWord.AsStringC(), word)) { - m_CodeRanges.Add(range); - } + if (CMap_GetCodeRange(range, m_LastWord.AsStringC(), word)) + m_CodeRanges.push_back(range); } m_CodeSeq++; } -- cgit v1.2.3