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_form.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_form.cpp')
-rw-r--r-- | core/src/fpdfdoc/doc_form.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/core/src/fpdfdoc/doc_form.cpp b/core/src/fpdfdoc/doc_form.cpp index d8ca525f0a..47f4a9139c 100644 --- a/core/src/fpdfdoc/doc_form.cpp +++ b/core/src/fpdfdoc/doc_form.cpp @@ -126,10 +126,7 @@ CFieldTree::_Node *CFieldTree::AddChild(_Node *pParent, const CFX_WideString &sh if (pParent == NULL) { return NULL; } - _Node *pNode = FX_NEW _Node; - if (pNode == NULL) { - return NULL; - } + _Node* pNode = new _Node; pNode->parent = pParent; pNode->short_name = short_name; pNode->field_ptr = field_ptr; @@ -270,7 +267,7 @@ CPDF_InterForm::CPDF_InterForm(CPDF_Document* pDocument, FX_BOOL bGenerateAP) : m_bGenerateAP = bGenerateAP; m_pFormNotify = NULL; m_bUpdated = FALSE; - m_pFieldTree = FX_NEW CFieldTree; + m_pFieldTree = new CFieldTree; CPDF_Dictionary* pRoot = m_pDocument->GetRoot(); m_pFormDict = pRoot->GetDict("AcroForm"); if (m_pFormDict == NULL) { @@ -1334,7 +1331,7 @@ CPDF_FormField* CPDF_InterForm::AddTerminalField(const CPDF_Dictionary* pFieldDi } } } - pField = FX_NEW CPDF_FormField(this, pParent); + pField = new CPDF_FormField(this, pParent); CPDF_Object* pTObj = pDict->GetElement("T"); if (pTObj && pTObj->GetType() == PDFOBJ_REFERENCE) { CPDF_Object* pClone = pTObj->Clone(TRUE); @@ -1371,10 +1368,7 @@ CPDF_FormControl* CPDF_InterForm::AddControl(const CPDF_FormField* pField, const if (m_ControlMap.Lookup((CPDF_Dictionary*)pWidgetDict, rValue)) { return (CPDF_FormControl*)rValue; } - CPDF_FormControl* pControl = FX_NEW CPDF_FormControl((CPDF_FormField*)pField, (CPDF_Dictionary*)pWidgetDict); - if (pControl == NULL) { - return NULL; - } + CPDF_FormControl* pControl = new CPDF_FormControl((CPDF_FormField*)pField, (CPDF_Dictionary*)pWidgetDict); m_ControlMap.SetAt((CPDF_Dictionary*)pWidgetDict, pControl); ((CPDF_FormField*)pField)->m_ControlList.Add(pControl); return pControl; |