summaryrefslogtreecommitdiff
path: root/xfa/src/fdp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-10-02 10:22:14 -0700
committerLei Zhang <thestig@chromium.org>2015-10-02 10:22:14 -0700
commit421b4612439ee3a81d675b542038c6c3ff25e977 (patch)
tree5cc05d8c1cbf7825dfd60dc8219af390f8066e78 /xfa/src/fdp
parentdb5256fb4ad0678ab7f895c40391cb77a3ba40fa (diff)
downloadpdfium-421b4612439ee3a81d675b542038c6c3ff25e977.tar.xz
XFA: Remove test for new.
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1377853004 .
Diffstat (limited to 'xfa/src/fdp')
-rw-r--r--xfa/src/fdp/src/css/fde_cssstylesheet.cpp6
-rw-r--r--xfa/src/fdp/src/fde/fde_gedevice.cpp8
-rw-r--r--xfa/src/fdp/src/xml/fde_xml.cpp2
3 files changed, 2 insertions, 14 deletions
diff --git a/xfa/src/fdp/src/css/fde_cssstylesheet.cpp b/xfa/src/fdp/src/css/fde_cssstylesheet.cpp
index c94236d346..0ba1751b9f 100644
--- a/xfa/src/fdp/src/css/fde_cssstylesheet.cpp
+++ b/xfa/src/fdp/src/css/fde_cssstylesheet.cpp
@@ -48,9 +48,6 @@ IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadFromStream(
FX_WORD wCodePage,
FX_DWORD dwMediaList) {
CFDE_CSSStyleSheet* pStyleSheet = new CFDE_CSSStyleSheet(dwMediaList);
- if (pStyleSheet == NULL) {
- return NULL;
- }
if (!pStyleSheet->LoadFromStream(szUrl, pStream, wCodePage)) {
pStyleSheet->Release();
pStyleSheet = NULL;
@@ -64,9 +61,6 @@ IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadFromBuffer(
FX_WORD wCodePage,
FX_DWORD dwMediaList) {
CFDE_CSSStyleSheet* pStyleSheet = new CFDE_CSSStyleSheet(dwMediaList);
- if (pStyleSheet == NULL) {
- return NULL;
- }
if (!pStyleSheet->LoadFromBuffer(szUrl, pBuffer, iBufSize, wCodePage)) {
pStyleSheet->Release();
pStyleSheet = NULL;
diff --git a/xfa/src/fdp/src/fde/fde_gedevice.cpp b/xfa/src/fdp/src/fde/fde_gedevice.cpp
index 81741a4cbb..4b716b4941 100644
--- a/xfa/src/fdp/src/fde/fde_gedevice.cpp
+++ b/xfa/src/fdp/src/fde/fde_gedevice.cpp
@@ -31,17 +31,11 @@ IFDE_RenderDevice* IFDE_RenderDevice::Create(CFX_DIBitmap* pBitmap,
return NULL;
}
CFX_FxgeDevice* pDevice = new CFX_FxgeDevice;
- if (pDevice == NULL) {
- return NULL;
- }
pDevice->Attach(pBitmap, 0, bRgbByteOrder);
return new CFDE_FxgeDevice(pDevice, TRUE);
}
IFDE_RenderDevice* IFDE_RenderDevice::Create(CFX_RenderDevice* pDevice) {
- if (pDevice == NULL) {
- return NULL;
- }
- return new CFDE_FxgeDevice(pDevice, FALSE);
+ return pDevice ? new CFDE_FxgeDevice(pDevice, FALSE) : nullptr;
}
CFDE_FxgeDevice::CFDE_FxgeDevice(CFX_RenderDevice* pDevice,
FX_BOOL bOwnerDevice)
diff --git a/xfa/src/fdp/src/xml/fde_xml.cpp b/xfa/src/fdp/src/xml/fde_xml.cpp
index db1e8fc23e..056254a149 100644
--- a/xfa/src/fdp/src/xml/fde_xml.cpp
+++ b/xfa/src/fdp/src/xml/fde_xml.cpp
@@ -925,7 +925,7 @@ FX_BOOL CFDE_XMLDoc::LoadXML(IFX_Stream* pXMLStream,
} else {
m_pXMLParser = new CFDE_XMLSAXParser(pHandler, m_pSyntaxParser);
}
- return m_pXMLParser != NULL;
+ return TRUE;
}
FX_BOOL CFDE_XMLDoc::LoadXML(IFDE_XMLParser* pXMLParser) {
if (pXMLParser == NULL) {