Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Unified Diff: core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp

Issue 1135273004: Remove FX_NEW_VECTOR() macros. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
index b306c66dcbd5942dae947d6f6ac9ed83c7d3cf91..b3e3cd6a2caf937ba84fe165c9284d2d4d8c8665 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
@@ -1348,8 +1348,7 @@ void CPDF_StreamContentParser::Handle_ShowText_Positioning()
};
return;
}
- CFX_ByteString* pStrs;
- FX_NEW_VECTOR(pStrs, CFX_ByteString, nsegs);
+ CFX_ByteString* pStrs = new CFX_ByteString[nsegs];
FX_FLOAT* pKerning = FX_Alloc(FX_FLOAT, nsegs);
int iSegment = 0;
FX_FLOAT fInitKerning = 0;
@@ -1372,7 +1371,7 @@ void CPDF_StreamContentParser::Handle_ShowText_Positioning()
}
}
AddTextObject(pStrs, fInitKerning, pKerning, iSegment);
- FX_DELETE_VECTOR(pStrs, CFX_ByteString, nsegs);
+ delete[] pStrs;
FX_Free(pKerning);
}
void CPDF_StreamContentParser::Handle_SetTextLeading()
« no previous file with comments | « core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698