loplugin:staticcall
Change-Id: I2317522af91c8c60672c72a3b514767039930e22
This commit is contained in:
parent
6d0f3a8479
commit
0a9773df87
1 changed files with 8 additions and 11 deletions
|
@ -590,12 +590,11 @@ OStoreDirectoryPageObject::scope (
|
|||
page::DataBlock::LinkDescriptor &rDescr) const
|
||||
{
|
||||
page const & rPage = PAGE();
|
||||
OStoreDirectoryDataBlock const & rDataBlock = rPage.m_aDataBlock;
|
||||
|
||||
sal_uInt32 index0, index1, index2, index3;
|
||||
|
||||
// direct.
|
||||
sal_uInt32 nCount = rDataBlock.directCount();
|
||||
sal_uInt32 nCount = OStoreDirectoryDataBlock::directCount();
|
||||
sal_uInt32 nLimit = nCount;
|
||||
if (nPage < nLimit)
|
||||
{
|
||||
|
@ -612,7 +611,7 @@ OStoreDirectoryPageObject::scope (
|
|||
|
||||
// single indirect.
|
||||
sal_uInt32 const nCapacity = indirect::capacityCount(rPage.m_aDescr);
|
||||
nCount = rDataBlock.singleCount();
|
||||
nCount = OStoreDirectoryDataBlock::singleCount();
|
||||
nLimit = nCount * nCapacity;
|
||||
if (nPage < nLimit)
|
||||
{
|
||||
|
@ -641,7 +640,7 @@ OStoreDirectoryPageObject::scope (
|
|||
nPage -= nLimit;
|
||||
|
||||
// double indirect.
|
||||
nCount = rDataBlock.doubleCount();
|
||||
nCount = OStoreDirectoryDataBlock::doubleCount();
|
||||
nLimit = nCount * nCapacity * nCapacity;
|
||||
if (nPage < nLimit)
|
||||
{
|
||||
|
@ -676,7 +675,7 @@ OStoreDirectoryPageObject::scope (
|
|||
nPage -= nLimit;
|
||||
|
||||
// triple indirect.
|
||||
nCount = rDataBlock.tripleCount();
|
||||
nCount = OStoreDirectoryDataBlock::tripleCount();
|
||||
nLimit = nCount * nCapacity * nCapacity * nCapacity;
|
||||
if (nPage < nLimit)
|
||||
{
|
||||
|
@ -1012,14 +1011,12 @@ storeError OStoreDirectoryPageObject::truncate (
|
|||
sal_uInt16 nRemain,
|
||||
OStorePageBIOS &rBIOS)
|
||||
{
|
||||
OStoreDirectoryDataBlock const & rDataBlock = PAGE().m_aDataBlock;
|
||||
|
||||
// Enter.
|
||||
storeError eErrCode = store_E_None;
|
||||
if (eScope == page::SCOPE_DIRECT)
|
||||
{
|
||||
// Truncate direct data pages.
|
||||
sal_uInt16 i, n = rDataBlock.directCount();
|
||||
sal_uInt16 i, n = OStoreDirectoryDataBlock::directCount();
|
||||
for (i = n; i > nRemain; i--)
|
||||
{
|
||||
// Obtain data page location.
|
||||
|
@ -1042,7 +1039,7 @@ storeError OStoreDirectoryPageObject::truncate (
|
|||
if (eScope == page::SCOPE_SINGLE)
|
||||
{
|
||||
// Truncate single indirect pages.
|
||||
sal_uInt16 i, n = rDataBlock.singleCount();
|
||||
sal_uInt16 i, n = OStoreDirectoryDataBlock::singleCount();
|
||||
for (i = n; i > nRemain; i--)
|
||||
{
|
||||
// Truncate single indirect page to zero data pages.
|
||||
|
@ -1061,7 +1058,7 @@ storeError OStoreDirectoryPageObject::truncate (
|
|||
if (eScope == page::SCOPE_DOUBLE)
|
||||
{
|
||||
// Truncate double indirect pages.
|
||||
sal_uInt16 i, n = rDataBlock.doubleCount();
|
||||
sal_uInt16 i, n = OStoreDirectoryDataBlock::doubleCount();
|
||||
for (i = n; i > nRemain; i--)
|
||||
{
|
||||
// Truncate double indirect page to zero single indirect pages.
|
||||
|
@ -1080,7 +1077,7 @@ storeError OStoreDirectoryPageObject::truncate (
|
|||
if (eScope == page::SCOPE_TRIPLE)
|
||||
{
|
||||
// Truncate triple indirect pages.
|
||||
sal_uInt16 i, n = rDataBlock.tripleCount();
|
||||
sal_uInt16 i, n = OStoreDirectoryDataBlock::tripleCount();
|
||||
for (i = n; i > nRemain; i--)
|
||||
{
|
||||
// Truncate to zero double indirect pages.
|
||||
|
|
Loading…
Reference in a new issue