diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-04-16 14:13:14 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-04-16 14:13:14 -0700 |
commit | 357d16f8453c2cf0c0afd00eec9e86d03d55fe69 (patch) | |
tree | 7a8fe29a921ae4a9dfc6063fd126c6c62181686f /core/src/fpdfdoc/doc_annot.cpp | |
parent | 269aaa26f33891f42934fa4f3e4ca3e320018a21 (diff) | |
download | pdfium-357d16f8453c2cf0c0afd00eec9e86d03d55fe69.tar.xz |
Replace FX_NEW with new, remove tests in fpdfdoc.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1090693002
Diffstat (limited to 'core/src/fpdfdoc/doc_annot.cpp')
-rw-r--r-- | core/src/fpdfdoc/doc_annot.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
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(); |