summaryrefslogtreecommitdiff
path: root/core/src/fxge/apple
diff options
context:
space:
mode:
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;