summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_font
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-05-15 14:01:28 -0700
committerTom Sepez <tsepez@chromium.org>2015-05-15 14:01:28 -0700
commitb6e5df2eded21ca142adf43b4f78a9027589bfeb (patch)
treee665051b0d327fff3aa55b3ca4169116d79f39bc /core/src/fpdfapi/fpdf_font
parent861a552af4aa7edb24c600e25a7bf388a1cdb364 (diff)
downloadpdfium-b6e5df2eded21ca142adf43b4f78a9027589bfeb.tar.xz
Merge to XFA: Remove FX_NEW_VECTOR() macros.
Original Review URL: https://codereview.chromium.org/1135273004 R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1134003007
Diffstat (limited to 'core/src/fpdfapi/fpdf_font')
-rw-r--r--core/src/fpdfapi/fpdf_font/fpdf_font.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
index 66d7d4f026..80dd1df803 100644
--- a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
+++ b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
@@ -786,7 +786,7 @@ void CPDF_Font::LoadPDFEncoding(CPDF_Object* pEncoding, int& iBaseEncoding, CFX_
if (pDiffs == NULL) {
return;
}
- FX_NEW_VECTOR(pCharNames, CFX_ByteString, 256);
+ pCharNames = new CFX_ByteString[256];
FX_DWORD cur_code = 0;
for (FX_DWORD i = 0; i < pDiffs->GetCount(); i ++) {
CPDF_Object* pElement = pDiffs->GetElementValue(i);
@@ -828,9 +828,7 @@ CPDF_SimpleFont::CPDF_SimpleFont(int fonttype) : CPDF_Font(fonttype)
}
CPDF_SimpleFont::~CPDF_SimpleFont()
{
- if (m_pCharNames) {
- FX_DELETE_VECTOR(m_pCharNames, CFX_ByteString, 256);
- }
+ delete[] m_pCharNames;
}
int CPDF_SimpleFont::GlyphFromCharCode(FX_DWORD charcode, FX_BOOL *pVertGlyph)
{
@@ -971,10 +969,8 @@ FX_BOOL CPDF_SimpleFont::LoadCommon()
CPDF_Object* pEncoding = m_pFontDict->GetElementValue(FX_BSTRC("Encoding"));
LoadPDFEncoding(pEncoding, m_BaseEncoding, m_pCharNames, m_pFontFile != NULL, m_Font.IsTTFont());
LoadGlyphMap();
- if (m_pCharNames) {
- FX_DELETE_VECTOR(m_pCharNames, CFX_ByteString, 256);
- m_pCharNames = NULL;
- }
+ delete[] m_pCharNames;
+ m_pCharNames = NULL;
if (m_Font.m_Face == NULL) {
return TRUE;
}