From 357d16f8453c2cf0c0afd00eec9e86d03d55fe69 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 16 Apr 2015 14:13:14 -0700 Subject: Replace FX_NEW with new, remove tests in fpdfdoc. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1090693002 --- core/src/fpdfdoc/doc_annot.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'core/src/fpdfdoc/doc_annot.cpp') diff --git a/core/src/fpdfdoc/doc_annot.cpp b/core/src/fpdfdoc/doc_annot.cpp index 8952845570..cc6b5ccfee 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(); -- cgit v1.2.3