summaryrefslogtreecommitdiff
path: root/core/src/fxcrt/fx_basic_util.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-04-15 14:17:33 -0700
committerTom Sepez <tsepez@chromium.org>2015-04-15 14:17:33 -0700
commit6c0d01b0244af7d8f9a896e626c7a7d5476a7373 (patch)
tree1c70510d319148c43eede72be9e937ad393c7920 /core/src/fxcrt/fx_basic_util.cpp
parentae4256f45df69bbfdf722a6ec17e1e851911ae4e (diff)
downloadpdfium-6c0d01b0244af7d8f9a896e626c7a7d5476a7373.tar.xz
Remove checks in fxcrt now that FX_NEW can't return 0.
Replace them with |new| so that we can tell by the presence of FX_NEW the places that still need to be audited. R=thestig@google.com, thestig@chromium.org Review URL: https://codereview.chromium.org/1052553006
Diffstat (limited to 'core/src/fxcrt/fx_basic_util.cpp')
-rw-r--r--core/src/fxcrt/fx_basic_util.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/core/src/fxcrt/fx_basic_util.cpp b/core/src/fxcrt/fx_basic_util.cpp
index 272d43eef7..98839b44c0 100644
--- a/core/src/fxcrt/fx_basic_util.cpp
+++ b/core/src/fxcrt/fx_basic_util.cpp
@@ -318,20 +318,14 @@ void* FX_OpenFolder(FX_LPCSTR path)
{
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
#ifndef _WIN32_WCE
- CFindFileDataA* pData = FX_NEW CFindFileDataA;
- if (!pData) {
- return NULL;
- }
+ CFindFileDataA* pData = new CFindFileDataA;
#ifdef _FX_WINAPI_PARTITION_DESKTOP_
pData->m_Handle = FindFirstFileA(CFX_ByteString(path) + "/*.*", &pData->m_FindData);
#else
pData->m_Handle = FindFirstFileExA(CFX_ByteString(path) + "/*.*", FindExInfoStandard, &pData->m_FindData, FindExSearchNameMatch, NULL, 0);
#endif
#else
- CFindFileDataW* pData = FX_NEW CFindFileDataW;
- if (!pData) {
- return NULL;
- }
+ CFindFileDataW* pData = new CFindFileDataW;
pData->m_Handle = FindFirstFileW(CFX_WideString::FromLocal(path) + L"/*.*", &pData->m_FindData);
#endif
if (pData->m_Handle == INVALID_HANDLE_VALUE) {
@@ -348,10 +342,7 @@ void* FX_OpenFolder(FX_LPCSTR path)
void* FX_OpenFolder(FX_LPCWSTR path)
{
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
- CFindFileDataW* pData = FX_NEW CFindFileDataW;
- if (!pData) {
- return NULL;
- }
+ CFindFileDataW* pData = new CFindFileDataW;
#ifdef _FX_WINAPI_PARTITION_DESKTOP_
pData->m_Handle = FindFirstFileW(CFX_WideString(path) + L"/*.*", &pData->m_FindData);
#else