summaryrefslogtreecommitdiff
path: root/core/src/fxge/apple
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-04-16 09:13:02 -0700
committerTom Sepez <tsepez@chromium.org>2015-04-16 09:13:02 -0700
commit3f754d483e257f0d373be28a64b58620b4e0953f (patch)
tree51dbd10bcfc25572ab5a6a70eba2eab0f6bf3131 /core/src/fxge/apple
parent026623249c78ba305c874cc093a035ef5a4cd1b4 (diff)
downloadpdfium-3f754d483e257f0d373be28a64b58620b4e0953f.tar.xz
Remove checks in fxge/{apple,win32,skia,dib} now that FX_NEW cant return 0
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1062863006
Diffstat (limited to 'core/src/fxge/apple')
-rw-r--r--core/src/fxge/apple/fx_mac_imp.cpp7
-rw-r--r--core/src/fxge/apple/fx_quartz_device.cpp15
2 files changed, 5 insertions, 17 deletions
diff --git a/core/src/fxge/apple/fx_mac_imp.cpp b/core/src/fxge/apple/fx_mac_imp.cpp
index 5acedc0bd9..75489ea2c3 100644
--- a/core/src/fxge/apple/fx_mac_imp.cpp
+++ b/core/src/fxge/apple/fx_mac_imp.cpp
@@ -87,10 +87,7 @@ void* CFX_MacFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pit
}
IFX_SystemFontInfo* IFX_SystemFontInfo::CreateDefault()
{
- CFX_MacFontInfo* pInfo = FX_NEW CFX_MacFontInfo;
- if (!pInfo) {
- return NULL;
- }
+ CFX_MacFontInfo* pInfo = new CFX_MacFontInfo;
pInfo->AddPath("~/Library/Fonts");
pInfo->AddPath("/Library/Fonts");
pInfo->AddPath("/System/Library/Fonts");
@@ -98,7 +95,7 @@ IFX_SystemFontInfo* IFX_SystemFontInfo::CreateDefault()
}
void CFX_GEModule::InitPlatform()
{
- m_pPlatformData = FX_NEW CApplePlatform;
+ m_pPlatformData = new CApplePlatform;
m_pFontMgr->SetSystemFontInfo(IFX_SystemFontInfo::CreateDefault());
}
void CFX_GEModule::DestroyPlatform()
diff --git a/core/src/fxge/apple/fx_quartz_device.cpp b/core/src/fxge/apple/fx_quartz_device.cpp
index 050d8744bd..f7faee15b3 100644
--- a/core/src/fxge/apple/fx_quartz_device.cpp
+++ b/core/src/fxge/apple/fx_quartz_device.cpp
@@ -1097,10 +1097,7 @@ FX_BOOL CFX_QuartzDevice::Attach(CGContextRef context, FX_INT32 nDeviceClass)
}
m_pContext = context;
CGContextRetain(m_pContext);
- IFX_RenderDeviceDriver* pDriver = FX_NEW CFX_QuartzDeviceDriver(m_pContext, nDeviceClass);
- if (!pDriver) {
- return FALSE;
- }
+ IFX_RenderDeviceDriver* pDriver = new CFX_QuartzDeviceDriver(m_pContext, nDeviceClass);
SetDeviceDriver(pDriver);
return TRUE;
}
@@ -1111,10 +1108,7 @@ FX_BOOL CFX_QuartzDevice::Attach(CFX_DIBitmap* pBitmap)
if (NULL == m_pContext) {
return FALSE;
}
- IFX_RenderDeviceDriver* pDriver = FX_NEW CFX_QuartzDeviceDriver(m_pContext, FXDC_DISPLAY);
- if (!pDriver) {
- return FALSE;
- }
+ IFX_RenderDeviceDriver* pDriver = new CFX_QuartzDeviceDriver(m_pContext, FXDC_DISPLAY);
SetDeviceDriver(pDriver);
return TRUE;
}
@@ -1123,10 +1117,7 @@ FX_BOOL CFX_QuartzDevice::Create(FX_INT32 width, FX_INT32 height, FXDIB_Format f
if ((FX_BYTE)format < 32) {
return FALSE;
}
- CFX_DIBitmap* pBitmap = FX_NEW CFX_DIBitmap;
- if (!pBitmap) {
- return FALSE;
- }
+ CFX_DIBitmap* pBitmap = new CFX_DIBitmap;
if (!pBitmap->Create(width, height, format)) {
delete pBitmap;
return FALSE;