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

Unified Diff: core/src/fpdfdoc/doc_annot.cpp

Issue 1090693002: Replace FX_NEW with new, remove tests in fpdfdoc. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Typo. 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 | « no previous file | core/src/fpdfdoc/doc_form.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfdoc/doc_annot.cpp
diff --git a/core/src/fpdfdoc/doc_annot.cpp b/core/src/fpdfdoc/doc_annot.cpp
index 89528455701f41f510b95c180ed4aaaffa5a364a..cc6b5ccfee917132c336eed4b547fac9e710819f 100644
--- a/core/src/fpdfdoc/doc_annot.cpp
+++ b/core/src/fpdfdoc/doc_annot.cpp
@@ -37,10 +37,7 @@ CPDF_AnnotList::CPDF_AnnotList(CPDF_Page* pPage)
pAnnots->RemoveAt(i + 1);
pDict = pAnnots->GetDict(i);
}
- CPDF_Annot* pAnnot = FX_NEW CPDF_Annot(pDict);
- if (pAnnot == NULL) {
- break;
- }
+ CPDF_Annot* pAnnot = new CPDF_Annot(pDict);
pAnnot->m_pList = this;
m_AnnotList.Add(pAnnot);
if (bRegenerateAP && pDict->GetConstString(FX_BSTRC("Subtype")) == FX_BSTRC("Widget"))
@@ -225,10 +222,7 @@ CPDF_Form* CPDF_Annot::GetAPForm(const CPDF_Page* pPage, AppearanceMode mode)
if (m_APMap.Lookup(pStream, (void*&)pForm)) {
return pForm;
}
- pForm = FX_NEW CPDF_Form(m_pList->m_pDocument, pPage->m_pResources, pStream);
- if (pForm == NULL) {
- return NULL;
- }
+ pForm = new CPDF_Form(m_pList->m_pDocument, pPage->m_pResources, pStream);
pForm->ParseContent(NULL, NULL, NULL, NULL);
m_APMap.SetAt(pStream, pForm);
return pForm;
@@ -323,10 +317,7 @@ CPDF_PageObject* CPDF_Annot::GetBorder(FX_BOOL bPrint, const CPDF_RenderOptions*
int B = (FX_INT32)(pColor->GetNumber(2) * 255);
argb = ArgbEncode(0xff, R, G, B);
}
- CPDF_PathObject *pPathObject = FX_NEW CPDF_PathObject();
- if (!pPathObject) {
- return NULL;
- }
+ CPDF_PathObject *pPathObject = new CPDF_PathObject();
CPDF_GraphStateData *pGraphState = pPathObject->m_GraphState.GetModify();
if (!pGraphState) {
pPathObject->Release();
« no previous file with comments | « no previous file | core/src/fpdfdoc/doc_form.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698