new doesn't return null on failure since C++98
Change-Id: Ib9260ec6ba148f0de248753148309a6c578e796d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177600 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
This commit is contained in:
parent
e3b9a442e0
commit
32ac606ec3
4 changed files with 0 additions and 22 deletions
|
@ -852,8 +852,6 @@ FileLockBytes_createInstance (
|
|||
if (xMapping.get().initialize (xFile.get().m_handle) == osl_File_E_None)
|
||||
{
|
||||
rxLockBytes = new MappedLockBytes (xMapping.get());
|
||||
if (!rxLockBytes.is())
|
||||
return store_E_OutOfMemory;
|
||||
(void) xFile.release();
|
||||
(void) xMapping.release();
|
||||
}
|
||||
|
@ -861,8 +859,6 @@ FileLockBytes_createInstance (
|
|||
if (!rxLockBytes.is())
|
||||
{
|
||||
rxLockBytes = new FileLockBytes (xFile.get());
|
||||
if (!rxLockBytes.is())
|
||||
return store_E_OutOfMemory;
|
||||
(void) xFile.release();
|
||||
}
|
||||
|
||||
|
@ -875,9 +871,6 @@ MemoryLockBytes_createInstance (
|
|||
)
|
||||
{
|
||||
rxLockBytes = new MemoryLockBytes();
|
||||
if (!rxLockBytes.is())
|
||||
return store_E_OutOfMemory;
|
||||
|
||||
return store_E_None;
|
||||
}
|
||||
|
||||
|
|
|
@ -110,9 +110,6 @@ storeError
|
|||
PageData::Allocator::createInstance (rtl::Reference< PageData::Allocator > & rxAllocator, sal_uInt16 nPageSize)
|
||||
{
|
||||
rtl::Reference< PageData::Allocator_Impl > xAllocator (new PageData::Allocator_Impl());
|
||||
if (!xAllocator.is())
|
||||
return store_E_OutOfMemory;
|
||||
|
||||
rxAllocator = &*xAllocator;
|
||||
return xAllocator->initialize (nPageSize);
|
||||
}
|
||||
|
|
|
@ -403,9 +403,6 @@ PageCache_createInstance (
|
|||
sal_uInt16 nPageSize)
|
||||
{
|
||||
rxCache = new PageCache (nPageSize);
|
||||
if (!rxCache.is())
|
||||
return store_E_OutOfMemory;
|
||||
|
||||
return store_E_None;
|
||||
}
|
||||
|
||||
|
|
|
@ -103,8 +103,6 @@ storeError store_createMemoryFile (
|
|||
OSL_ASSERT(xLockBytes.is());
|
||||
|
||||
Reference<OStorePageManager> xManager (new OStorePageManager());
|
||||
if (!xManager.is())
|
||||
return store_E_OutOfMemory;
|
||||
|
||||
eErrCode = xManager->initialize (
|
||||
&*xLockBytes, storeAccessMode::Create, nPageSize);
|
||||
|
@ -138,9 +136,6 @@ storeError store_openFile (
|
|||
OSL_ASSERT(xLockBytes.is());
|
||||
|
||||
Reference<OStorePageManager> xManager (new OStorePageManager());
|
||||
if (!xManager.is())
|
||||
return store_E_OutOfMemory;
|
||||
|
||||
eErrCode = xManager->initialize (
|
||||
&*xLockBytes, eAccessMode, nPageSize);
|
||||
if (eErrCode != store_E_None)
|
||||
|
@ -202,8 +197,6 @@ storeError store_openDirectory (
|
|||
return store_E_InvalidParameter;
|
||||
|
||||
Reference<OStoreDirectory_Impl> xDirectory (new OStoreDirectory_Impl());
|
||||
if (!xDirectory.is())
|
||||
return store_E_OutOfMemory;
|
||||
|
||||
OString aPath (pPath->buffer, pPath->length, RTL_TEXTENCODING_UTF8);
|
||||
OString aName (pName->buffer, pName->length, RTL_TEXTENCODING_UTF8);
|
||||
|
@ -282,8 +275,6 @@ storeError store_openStream (
|
|||
return store_E_InvalidParameter;
|
||||
|
||||
Reference<OStoreLockBytes> xLockBytes (new OStoreLockBytes());
|
||||
if (!xLockBytes.is())
|
||||
return store_E_OutOfMemory;
|
||||
|
||||
OString aPath (pPath->buffer, pPath->length, RTL_TEXTENCODING_UTF8);
|
||||
OString aName (pName->buffer, pName->length, RTL_TEXTENCODING_UTF8);
|
||||
|
|
Loading…
Reference in a new issue