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

Unified Diff: core/src/reflow/layoutprovider_taggedpdf.cpp

Issue 1084613006: Fix all remaining instances of FX_NEW. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: std::min Created 5 years, 8 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/reflow/layoutprocessor_reflow.cpp ('k') | core/src/reflow/reflowedpage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/reflow/layoutprovider_taggedpdf.cpp
diff --git a/core/src/reflow/layoutprovider_taggedpdf.cpp b/core/src/reflow/layoutprovider_taggedpdf.cpp
index c40c1cdb64fb002ad31605b082a0d1cdb0351bad..4a5a22bd614e12269ca75517120d8cee880d290b 100644
--- a/core/src/reflow/layoutprovider_taggedpdf.cpp
+++ b/core/src/reflow/layoutprovider_taggedpdf.cpp
@@ -636,10 +636,7 @@ IPDF_LayoutProvider* IPDF_LayoutProvider::Create_LayoutProvider_TaggedPDF(CPDF_P
if(pPage == NULL) {
return NULL;
}
- CPDF_LayoutProvider_TaggedPDF* pProvider = FX_NEW CPDF_LayoutProvider_TaggedPDF;
- if (!pProvider) {
- return NULL;
- }
+ CPDF_LayoutProvider_TaggedPDF* pProvider = new CPDF_LayoutProvider_TaggedPDF;
pProvider->Init(pPage);
return pProvider;
}
@@ -672,11 +669,7 @@ void CPDF_LayoutProvider_TaggedPDF::ProcessElement(CPDF_LayoutElement*pParent, C
m_Status = LayoutError;
return;
}
- CPDF_LayoutElement* pElement = FX_NEW CPDF_LayoutElement;
- if (!pElement) {
- m_Status = LayoutError;
- return;
- }
+ CPDF_LayoutElement* pElement = new CPDF_LayoutElement;
pElement->m_pParentElement = pParent;
pElement->m_pTaggedElement = pTaggedElement;
pParent->m_ChildArray.Add(pElement);
@@ -729,11 +722,7 @@ LayoutStatus CPDF_LayoutProvider_TaggedPDF::StartLoad(IFX_Pause* pPause)
m_Status = LayoutError;
return LayoutError;
}
- m_pRoot = FX_NEW CPDF_LayoutElement;
- if (!m_pRoot) {
- m_Status = LayoutError;
- return LayoutError;
- }
+ m_pRoot = new CPDF_LayoutElement;
for(int i = 0; i < count; i++) {
CPDF_StructElement* pElement = m_pPageTree->GetTopElement(i);
if(pElement) {
« no previous file with comments | « core/src/reflow/layoutprocessor_reflow.cpp ('k') | core/src/reflow/reflowedpage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698