loplugin:unuseddefaultparam in store
Change-Id: I825eb075b73daa5bf52e1d41c32cf2100abebe47
This commit is contained in:
@@ -323,15 +323,14 @@ public:
|
|||||||
/** Open the temporary file in memory.
|
/** Open the temporary file in memory.
|
||||||
@see store_createMemoryFile()
|
@see store_createMemoryFile()
|
||||||
*/
|
*/
|
||||||
inline storeError createInMemory (
|
inline storeError createInMemory ()
|
||||||
sal_uInt16 nPageSize = STORE_DEFAULT_PAGESIZE)
|
|
||||||
{
|
{
|
||||||
if (m_hImpl)
|
if (m_hImpl)
|
||||||
{
|
{
|
||||||
(void) store_releaseHandle (m_hImpl);
|
(void) store_releaseHandle (m_hImpl);
|
||||||
m_hImpl = nullptr;
|
m_hImpl = nullptr;
|
||||||
}
|
}
|
||||||
return store_createMemoryFile (nPageSize, &m_hImpl);
|
return store_createMemoryFile (STORE_DEFAULT_PAGESIZE, &m_hImpl);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Close the file.
|
/** Close the file.
|
||||||
|
@@ -443,7 +443,7 @@ public:
|
|||||||
static AceCache & get();
|
static AceCache & get();
|
||||||
|
|
||||||
OStorePageBIOS::Ace *
|
OStorePageBIOS::Ace *
|
||||||
create (sal_uInt32 addr, sal_uInt32 used = 1);
|
create (sal_uInt32 addr);
|
||||||
|
|
||||||
void
|
void
|
||||||
destroy (OStorePageBIOS::Ace * ace);
|
destroy (OStorePageBIOS::Ace * ace);
|
||||||
@@ -491,7 +491,7 @@ OStorePageBIOS::AceCache::~AceCache()
|
|||||||
}
|
}
|
||||||
|
|
||||||
OStorePageBIOS::Ace *
|
OStorePageBIOS::Ace *
|
||||||
OStorePageBIOS::AceCache::create (sal_uInt32 addr, sal_uInt32 used)
|
OStorePageBIOS::AceCache::create (sal_uInt32 addr)
|
||||||
{
|
{
|
||||||
Ace * ace = static_cast<Ace*>(rtl_cache_alloc (m_ace_cache));
|
Ace * ace = static_cast<Ace*>(rtl_cache_alloc (m_ace_cache));
|
||||||
if (ace != nullptr)
|
if (ace != nullptr)
|
||||||
@@ -501,7 +501,7 @@ OStorePageBIOS::AceCache::create (sal_uInt32 addr, sal_uInt32 used)
|
|||||||
|
|
||||||
// initialize.
|
// initialize.
|
||||||
ace->m_addr = addr;
|
ace->m_addr = addr;
|
||||||
ace->m_used = used;
|
ace->m_used = 1;
|
||||||
}
|
}
|
||||||
return ace;
|
return ace;
|
||||||
}
|
}
|
||||||
@@ -791,7 +791,7 @@ storeError OStorePageBIOS::releasePage (const OStorePageDescriptor& rDescr)
|
|||||||
* Precond: initialized, writeable.
|
* Precond: initialized, writeable.
|
||||||
*/
|
*/
|
||||||
storeError OStorePageBIOS::allocate (
|
storeError OStorePageBIOS::allocate (
|
||||||
OStorePageObject& rPage, Allocation eAlloc)
|
OStorePageObject& rPage)
|
||||||
{
|
{
|
||||||
// Acquire exclusive access.
|
// Acquire exclusive access.
|
||||||
osl::MutexGuard aGuard (m_aMutex);
|
osl::MutexGuard aGuard (m_aMutex);
|
||||||
@@ -804,8 +804,6 @@ storeError OStorePageBIOS::allocate (
|
|||||||
|
|
||||||
// Check allocation type.
|
// Check allocation type.
|
||||||
storeError eErrCode = store_E_None;
|
storeError eErrCode = store_E_None;
|
||||||
if (eAlloc != ALLOCATE_EOF)
|
|
||||||
{
|
|
||||||
// Try freelist head.
|
// Try freelist head.
|
||||||
PageData aPageHead;
|
PageData aPageHead;
|
||||||
eErrCode = m_pSuper->unusedHead (*this, aPageHead);
|
eErrCode = m_pSuper->unusedHead (*this, aPageHead);
|
||||||
@@ -823,7 +821,6 @@ storeError OStorePageBIOS::allocate (
|
|||||||
// Pop freelist head and finish.
|
// Pop freelist head and finish.
|
||||||
return m_pSuper->unusedPop (*this, aPageHead);
|
return m_pSuper->unusedPop (*this, aPageHead);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Allocate from EOF. Determine current size.
|
// Allocate from EOF. Determine current size.
|
||||||
sal_uInt32 nSize = STORE_PAGE_NULL;
|
sal_uInt32 nSize = STORE_PAGE_NULL;
|
||||||
|
@@ -92,17 +92,7 @@ public:
|
|||||||
|
|
||||||
storeError releasePage (const OStorePageDescriptor& rDescr);
|
storeError releasePage (const OStorePageDescriptor& rDescr);
|
||||||
|
|
||||||
/** Page Allocation.
|
storeError allocate (OStorePageObject& rPage);
|
||||||
*/
|
|
||||||
enum Allocation
|
|
||||||
{
|
|
||||||
ALLOCATE_FIRST = 0,
|
|
||||||
ALLOCATE_BEST = 1,
|
|
||||||
ALLOCATE_EOF = 2
|
|
||||||
};
|
|
||||||
|
|
||||||
storeError allocate (
|
|
||||||
OStorePageObject& rPage, Allocation eAllocation = ALLOCATE_FIRST);
|
|
||||||
|
|
||||||
storeError free (sal_uInt32 nAddr);
|
storeError free (sal_uInt32 nAddr);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user