Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
b3483a07
Kaydet (Commit)
b3483a07
authored
Mar 01, 2016
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
loplugin:unuseddefaultparam in store
Change-Id: I825eb075b73daa5bf52e1d41c32cf2100abebe47
üst
d7e1e8da
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
33 deletions
+19
-33
store.hxx
include/store/store.hxx
+2
-3
storbios.cxx
store/source/storbios.cxx
+16
-19
storbios.hxx
store/source/storbios.hxx
+1
-11
No files found.
include/store/store.hxx
Dosyayı görüntüle @
b3483a07
...
...
@@ -323,15 +323,14 @@ public:
/** Open the temporary file in memory.
@see store_createMemoryFile()
*/
inline
storeError
createInMemory
(
sal_uInt16
nPageSize
=
STORE_DEFAULT_PAGESIZE
)
inline
storeError
createInMemory
()
{
if
(
m_hImpl
)
{
(
void
)
store_releaseHandle
(
m_hImpl
);
m_hImpl
=
nullptr
;
}
return
store_createMemoryFile
(
nPageSize
,
&
m_hImpl
);
return
store_createMemoryFile
(
STORE_DEFAULT_PAGESIZE
,
&
m_hImpl
);
}
/** Close the file.
...
...
store/source/storbios.cxx
Dosyayı görüntüle @
b3483a07
...
...
@@ -443,7 +443,7 @@ public:
static
AceCache
&
get
();
OStorePageBIOS
::
Ace
*
create
(
sal_uInt32
addr
,
sal_uInt32
used
=
1
);
create
(
sal_uInt32
addr
);
void
destroy
(
OStorePageBIOS
::
Ace
*
ace
);
...
...
@@ -491,7 +491,7 @@ OStorePageBIOS::AceCache::~AceCache()
}
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
));
if
(
ace
!=
nullptr
)
...
...
@@ -501,7 +501,7 @@ OStorePageBIOS::AceCache::create (sal_uInt32 addr, sal_uInt32 used)
// initialize.
ace
->
m_addr
=
addr
;
ace
->
m_used
=
used
;
ace
->
m_used
=
1
;
}
return
ace
;
}
...
...
@@ -791,7 +791,7 @@ storeError OStorePageBIOS::releasePage (const OStorePageDescriptor& rDescr)
* Precond: initialized, writeable.
*/
storeError
OStorePageBIOS
::
allocate
(
OStorePageObject
&
rPage
,
Allocation
eAlloc
)
OStorePageObject
&
rPage
)
{
// Acquire exclusive access.
osl
::
MutexGuard
aGuard
(
m_aMutex
);
...
...
@@ -804,25 +804,22 @@ storeError OStorePageBIOS::allocate (
// Check allocation type.
storeError
eErrCode
=
store_E_None
;
if
(
eAlloc
!=
ALLOCATE_EOF
)
// Try freelist head.
PageData
aPageHead
;
eErrCode
=
m_pSuper
->
unusedHead
(
*
this
,
aPageHead
);
if
(
eErrCode
!=
store_E_None
)
return
eErrCode
;
sal_uInt32
const
nAddr
=
aPageHead
.
location
();
if
(
nAddr
!=
STORE_PAGE_NULL
)
{
// Try freelist head.
PageData
aPageHead
;
eErrCode
=
m_pSuper
->
unusedHead
(
*
this
,
aPageHead
);
// Save page.
eErrCode
=
saveObjectAt_Impl
(
rPage
,
nAddr
);
if
(
eErrCode
!=
store_E_None
)
return
eErrCode
;
sal_uInt32
const
nAddr
=
aPageHead
.
location
();
if
(
nAddr
!=
STORE_PAGE_NULL
)
{
// Save page.
eErrCode
=
saveObjectAt_Impl
(
rPage
,
nAddr
);
if
(
eErrCode
!=
store_E_None
)
return
eErrCode
;
// Pop freelist head and finish.
return
m_pSuper
->
unusedPop
(
*
this
,
aPageHead
);
}
// Pop freelist head and finish.
return
m_pSuper
->
unusedPop
(
*
this
,
aPageHead
);
}
// Allocate from EOF. Determine current size.
...
...
store/source/storbios.hxx
Dosyayı görüntüle @
b3483a07
...
...
@@ -92,17 +92,7 @@ public:
storeError
releasePage
(
const
OStorePageDescriptor
&
rDescr
);
/** Page Allocation.
*/
enum
Allocation
{
ALLOCATE_FIRST
=
0
,
ALLOCATE_BEST
=
1
,
ALLOCATE_EOF
=
2
};
storeError
allocate
(
OStorePageObject
&
rPage
,
Allocation
eAllocation
=
ALLOCATE_FIRST
);
storeError
allocate
(
OStorePageObject
&
rPage
);
storeError
free
(
sal_uInt32
nAddr
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment