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
eb4cbea6
Kaydet (Commit)
eb4cbea6
authored
Agu 16, 2015
tarafından
Matteo Casalin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Silence some conversion warnings
Change-Id: I676ed010576f3a24b193ffc6c28a319bcc5ac968
üst
4215bca9
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
25 additions
and
25 deletions
+25
-25
lockbyte.cxx
store/source/lockbyte.cxx
+2
-2
storbase.hxx
store/source/storbase.hxx
+4
-4
storbios.cxx
store/source/storbios.cxx
+4
-4
storcach.cxx
store/source/storcach.cxx
+1
-1
stordata.hxx
store/source/stordata.hxx
+11
-11
stordir.cxx
store/source/stordir.cxx
+1
-1
stortree.hxx
store/source/stortree.hxx
+2
-2
No files found.
store/source/lockbyte.cxx
Dosyayı görüntüle @
eb4cbea6
...
@@ -95,7 +95,7 @@ storeError ILockBytes::readAt (sal_uInt32 nOffset, void * pBuffer, sal_uInt32 nB
...
@@ -95,7 +95,7 @@ storeError ILockBytes::readAt (sal_uInt32 nOffset, void * pBuffer, sal_uInt32 nB
if
(
src_size
>
SAL_MAX_UINT32
)
if
(
src_size
>
SAL_MAX_UINT32
)
return
store_E_CantSeek
;
return
store_E_CantSeek
;
return
readAt_Impl
(
nOffset
,
dst_lo
,
(
dst_hi
-
dst_lo
)
);
return
readAt_Impl
(
nOffset
,
dst_lo
,
nBytes
);
}
}
storeError
ILockBytes
::
writeAt
(
sal_uInt32
nOffset
,
void
const
*
pBuffer
,
sal_uInt32
nBytes
)
storeError
ILockBytes
::
writeAt
(
sal_uInt32
nOffset
,
void
const
*
pBuffer
,
sal_uInt32
nBytes
)
...
@@ -117,7 +117,7 @@ storeError ILockBytes::writeAt (sal_uInt32 nOffset, void const * pBuffer, sal_uI
...
@@ -117,7 +117,7 @@ storeError ILockBytes::writeAt (sal_uInt32 nOffset, void const * pBuffer, sal_uI
if
(
dst_size
>
SAL_MAX_UINT32
)
if
(
dst_size
>
SAL_MAX_UINT32
)
return
store_E_CantSeek
;
return
store_E_CantSeek
;
return
writeAt_Impl
(
nOffset
,
src_lo
,
(
src_hi
-
src_lo
)
);
return
writeAt_Impl
(
nOffset
,
src_lo
,
nBytes
);
}
}
storeError
ILockBytes
::
getSize
(
sal_uInt32
&
rnSize
)
storeError
ILockBytes
::
getSize
(
sal_uInt32
&
rnSize
)
...
...
store/source/storbase.hxx
Dosyayı görüntüle @
eb4cbea6
...
@@ -512,9 +512,9 @@ struct PageData
...
@@ -512,9 +512,9 @@ struct PageData
void
guard
(
sal_uInt32
nAddr
)
void
guard
(
sal_uInt32
nAddr
)
{
{
sal_uInt32
nCRC32
=
0
;
sal_uInt32
nCRC32
=
0
;
nCRC32
=
rtl_crc32
(
nCRC32
,
&
m_aGuard
.
m_nMagic
,
s
izeof
(
sal_uInt32
));
nCRC32
=
rtl_crc32
(
nCRC32
,
&
m_aGuard
.
m_nMagic
,
s
tatic_cast
<
sal_uInt32
>
(
sizeof
(
sal_uInt32
)
));
m_aDescr
.
m_nAddr
=
store
::
htonl
(
nAddr
);
m_aDescr
.
m_nAddr
=
store
::
htonl
(
nAddr
);
nCRC32
=
rtl_crc32
(
nCRC32
,
&
m_aDescr
,
theSize
-
sizeof
(
G
));
nCRC32
=
rtl_crc32
(
nCRC32
,
&
m_aDescr
,
static_cast
<
sal_uInt32
>
(
theSize
-
sizeof
(
G
)
));
m_aGuard
.
m_nCRC32
=
store
::
htonl
(
nCRC32
);
m_aGuard
.
m_nCRC32
=
store
::
htonl
(
nCRC32
);
}
}
...
@@ -523,8 +523,8 @@ struct PageData
...
@@ -523,8 +523,8 @@ struct PageData
storeError
verify
(
sal_uInt32
nAddr
)
const
storeError
verify
(
sal_uInt32
nAddr
)
const
{
{
sal_uInt32
nCRC32
=
0
;
sal_uInt32
nCRC32
=
0
;
nCRC32
=
rtl_crc32
(
nCRC32
,
&
m_aGuard
.
m_nMagic
,
s
izeof
(
sal_uInt32
));
nCRC32
=
rtl_crc32
(
nCRC32
,
&
m_aGuard
.
m_nMagic
,
s
tatic_cast
<
sal_uInt32
>
(
sizeof
(
sal_uInt32
)
));
nCRC32
=
rtl_crc32
(
nCRC32
,
&
m_aDescr
,
theSize
-
sizeof
(
G
));
nCRC32
=
rtl_crc32
(
nCRC32
,
&
m_aDescr
,
static_cast
<
sal_uInt32
>
(
theSize
-
sizeof
(
G
)
));
if
(
m_aGuard
.
m_nCRC32
!=
store
::
htonl
(
nCRC32
))
if
(
m_aGuard
.
m_nCRC32
!=
store
::
htonl
(
nCRC32
))
return
store_E_InvalidChecksum
;
return
store_E_InvalidChecksum
;
if
(
m_aDescr
.
m_nAddr
!=
store
::
htonl
(
nAddr
))
if
(
m_aDescr
.
m_nAddr
!=
store
::
htonl
(
nAddr
))
...
...
store/source/storbios.cxx
Dosyayı görüntüle @
eb4cbea6
...
@@ -120,8 +120,8 @@ struct OStoreSuperBlock
...
@@ -120,8 +120,8 @@ struct OStoreSuperBlock
void
guard
()
void
guard
()
{
{
sal_uInt32
nCRC32
=
0
;
sal_uInt32
nCRC32
=
0
;
nCRC32
=
rtl_crc32
(
nCRC32
,
&
m_aGuard
.
m_nMagic
,
s
izeof
(
sal_uInt32
));
nCRC32
=
rtl_crc32
(
nCRC32
,
&
m_aGuard
.
m_nMagic
,
s
tatic_cast
<
sal_uInt32
>
(
sizeof
(
sal_uInt32
)
));
nCRC32
=
rtl_crc32
(
nCRC32
,
&
m_aDescr
,
theSize
-
sizeof
(
G
));
nCRC32
=
rtl_crc32
(
nCRC32
,
&
m_aDescr
,
static_cast
<
sal_uInt32
>
(
theSize
-
sizeof
(
G
)
));
m_aGuard
.
m_nCRC32
=
store
::
htonl
(
nCRC32
);
m_aGuard
.
m_nCRC32
=
store
::
htonl
(
nCRC32
);
}
}
...
@@ -134,8 +134,8 @@ struct OStoreSuperBlock
...
@@ -134,8 +134,8 @@ struct OStoreSuperBlock
return
store_E_WrongFormat
;
return
store_E_WrongFormat
;
sal_uInt32
nCRC32
=
0
;
sal_uInt32
nCRC32
=
0
;
nCRC32
=
rtl_crc32
(
nCRC32
,
&
m_aGuard
.
m_nMagic
,
s
izeof
(
sal_uInt32
));
nCRC32
=
rtl_crc32
(
nCRC32
,
&
m_aGuard
.
m_nMagic
,
s
tatic_cast
<
sal_uInt32
>
(
sizeof
(
sal_uInt32
)
));
nCRC32
=
rtl_crc32
(
nCRC32
,
&
m_aDescr
,
theSize
-
sizeof
(
G
));
nCRC32
=
rtl_crc32
(
nCRC32
,
&
m_aDescr
,
static_cast
<
sal_uInt32
>
(
theSize
-
sizeof
(
G
)
));
if
(
m_aGuard
.
m_nCRC32
!=
store
::
htonl
(
nCRC32
))
if
(
m_aGuard
.
m_nCRC32
!=
store
::
htonl
(
nCRC32
))
return
store_E_InvalidChecksum
;
return
store_E_InvalidChecksum
;
else
else
...
...
store/source/storcach.cxx
Dosyayı görüntüle @
eb4cbea6
...
@@ -244,7 +244,7 @@ class PageCache_Impl :
...
@@ -244,7 +244,7 @@ class PageCache_Impl :
static
inline
int
hash_Impl
(
sal_uInt32
a
,
size_t
s
,
size_t
q
,
size_t
m
)
static
inline
int
hash_Impl
(
sal_uInt32
a
,
size_t
s
,
size_t
q
,
size_t
m
)
{
{
return
((((
a
)
+
((
a
)
>>
(
s
))
+
((
a
)
>>
((
s
)
<<
1
)))
>>
(
q
))
&
(
m
));
return
static_cast
<
int
>
((((
a
)
+
((
a
)
>>
(
s
))
+
((
a
)
>>
((
s
)
<<
1
)))
>>
(
q
))
&
(
m
));
}
}
inline
int
hash_index_Impl
(
sal_uInt32
nOffset
)
inline
int
hash_index_Impl
(
sal_uInt32
nOffset
)
{
{
...
...
store/source/stordata.hxx
Dosyayı görüntüle @
eb4cbea6
...
@@ -63,7 +63,7 @@ struct OStoreDataPageData : public store::OStorePageData
...
@@ -63,7 +63,7 @@ struct OStoreDataPageData : public store::OStorePageData
*/
*/
static
sal_uInt16
capacity
(
const
D
&
rDescr
)
// @see inode::ChunkDescriptor
static
sal_uInt16
capacity
(
const
D
&
rDescr
)
// @see inode::ChunkDescriptor
{
{
return
(
store
::
ntohs
(
rDescr
.
m_nSize
)
-
self
::
thePageSize
);
return
static_cast
<
sal_uInt16
>
(
store
::
ntohs
(
rDescr
.
m_nSize
)
-
self
::
thePageSize
);
}
}
sal_uInt16
capacity
()
const
sal_uInt16
capacity
()
const
{
{
...
@@ -149,7 +149,7 @@ struct OStoreIndirectionPageData : public store::OStorePageData
...
@@ -149,7 +149,7 @@ struct OStoreIndirectionPageData : public store::OStorePageData
*/
*/
static
sal_uInt16
capacity
(
const
D
&
rDescr
)
static
sal_uInt16
capacity
(
const
D
&
rDescr
)
{
{
return
(
store
::
ntohs
(
rDescr
.
m_nSize
)
-
self
::
thePageSize
);
return
static_cast
<
sal_uInt16
>
(
store
::
ntohs
(
rDescr
.
m_nSize
)
-
self
::
thePageSize
);
}
}
sal_uInt16
capacity
()
const
sal_uInt16
capacity
()
const
{
{
...
@@ -320,8 +320,8 @@ struct OStorePageNameBlock
...
@@ -320,8 +320,8 @@ struct OStorePageNameBlock
void
guard
()
void
guard
()
{
{
sal_uInt32
nCRC32
=
0
;
sal_uInt32
nCRC32
=
0
;
nCRC32
=
rtl_crc32
(
nCRC32
,
&
m_aGuard
.
m_nMagic
,
s
izeof
(
sal_uInt32
));
nCRC32
=
rtl_crc32
(
nCRC32
,
&
m_aGuard
.
m_nMagic
,
s
tatic_cast
<
sal_uInt32
>
(
sizeof
(
sal_uInt32
)
));
nCRC32
=
rtl_crc32
(
nCRC32
,
&
m_aKey
,
theSize
-
sizeof
(
G
));
nCRC32
=
rtl_crc32
(
nCRC32
,
&
m_aKey
,
static_cast
<
sal_uInt32
>
(
theSize
-
sizeof
(
G
)
));
m_aGuard
.
m_nCRC32
=
store
::
htonl
(
nCRC32
);
m_aGuard
.
m_nCRC32
=
store
::
htonl
(
nCRC32
);
}
}
...
@@ -330,8 +330,8 @@ struct OStorePageNameBlock
...
@@ -330,8 +330,8 @@ struct OStorePageNameBlock
storeError
verify
()
const
storeError
verify
()
const
{
{
sal_uInt32
nCRC32
=
0
;
sal_uInt32
nCRC32
=
0
;
nCRC32
=
rtl_crc32
(
nCRC32
,
&
m_aGuard
.
m_nMagic
,
s
izeof
(
sal_uInt32
));
nCRC32
=
rtl_crc32
(
nCRC32
,
&
m_aGuard
.
m_nMagic
,
s
tatic_cast
<
sal_uInt32
>
(
sizeof
(
sal_uInt32
)
));
nCRC32
=
rtl_crc32
(
nCRC32
,
&
m_aKey
,
theSize
-
sizeof
(
G
));
nCRC32
=
rtl_crc32
(
nCRC32
,
&
m_aKey
,
static_cast
<
sal_uInt32
>
(
theSize
-
sizeof
(
G
)
));
if
(
m_aGuard
.
m_nCRC32
!=
store
::
htonl
(
nCRC32
))
if
(
m_aGuard
.
m_nCRC32
!=
store
::
htonl
(
nCRC32
))
return
store_E_InvalidChecksum
;
return
store_E_InvalidChecksum
;
else
else
...
@@ -424,8 +424,8 @@ struct OStoreDirectoryDataBlock
...
@@ -424,8 +424,8 @@ struct OStoreDirectoryDataBlock
void
guard
()
void
guard
()
{
{
sal_uInt32
nCRC32
=
0
;
sal_uInt32
nCRC32
=
0
;
nCRC32
=
rtl_crc32
(
nCRC32
,
&
m_aGuard
.
m_nMagic
,
s
izeof
(
sal_uInt32
));
nCRC32
=
rtl_crc32
(
nCRC32
,
&
m_aGuard
.
m_nMagic
,
s
tatic_cast
<
sal_uInt32
>
(
sizeof
(
sal_uInt32
)
));
nCRC32
=
rtl_crc32
(
nCRC32
,
&
m_aTable
,
theSize
-
sizeof
(
G
));
nCRC32
=
rtl_crc32
(
nCRC32
,
&
m_aTable
,
static_cast
<
sal_uInt32
>
(
theSize
-
sizeof
(
G
)
));
m_aGuard
.
m_nCRC32
=
store
::
htonl
(
nCRC32
);
m_aGuard
.
m_nCRC32
=
store
::
htonl
(
nCRC32
);
}
}
...
@@ -434,8 +434,8 @@ struct OStoreDirectoryDataBlock
...
@@ -434,8 +434,8 @@ struct OStoreDirectoryDataBlock
storeError
verify
()
const
storeError
verify
()
const
{
{
sal_uInt32
nCRC32
=
0
;
sal_uInt32
nCRC32
=
0
;
nCRC32
=
rtl_crc32
(
nCRC32
,
&
m_aGuard
.
m_nMagic
,
s
izeof
(
sal_uInt32
));
nCRC32
=
rtl_crc32
(
nCRC32
,
&
m_aGuard
.
m_nMagic
,
s
tatic_cast
<
sal_uInt32
>
(
sizeof
(
sal_uInt32
)
));
nCRC32
=
rtl_crc32
(
nCRC32
,
&
m_aTable
,
theSize
-
sizeof
(
G
));
nCRC32
=
rtl_crc32
(
nCRC32
,
&
m_aTable
,
static_cast
<
sal_uInt32
>
(
theSize
-
sizeof
(
G
)
));
if
(
m_aGuard
.
m_nCRC32
!=
store
::
htonl
(
nCRC32
))
if
(
m_aGuard
.
m_nCRC32
!=
store
::
htonl
(
nCRC32
))
return
store_E_InvalidChecksum
;
return
store_E_InvalidChecksum
;
else
else
...
@@ -547,7 +547,7 @@ struct OStoreDirectoryPageData : public store::OStorePageData
...
@@ -547,7 +547,7 @@ struct OStoreDirectoryPageData : public store::OStorePageData
*/
*/
sal_uInt16
capacity
()
const
sal_uInt16
capacity
()
const
{
{
return
(
store
::
ntohs
(
base
::
m_aDescr
.
m_nSize
)
-
self
::
thePageSize
);
return
static_cast
<
sal_uInt16
>
(
store
::
ntohs
(
base
::
m_aDescr
.
m_nSize
)
-
self
::
thePageSize
);
}
}
/** Construction.
/** Construction.
...
...
store/source/stordir.cxx
Dosyayı görüntüle @
eb4cbea6
...
@@ -191,7 +191,7 @@ storeError OStoreDirectory_Impl::iterate (storeFindData &rFindData)
...
@@ -191,7 +191,7 @@ storeError OStoreDirectory_Impl::iterate (storeFindData &rFindData)
memset
(
&
rFindData
.
m_pszName
[
n
],
0
,
k
);
memset
(
&
rFindData
.
m_pszName
[
n
],
0
,
k
);
}
}
rFindData
.
m_nLength
=
n
;
rFindData
.
m_nLength
=
static_cast
<
sal_Int32
>
(
n
)
;
rFindData
.
m_nAttrib
|=
aPage
.
attrib
();
rFindData
.
m_nAttrib
|=
aPage
.
attrib
();
rFindData
.
m_nSize
=
aPage
.
dataLength
();
rFindData
.
m_nSize
=
aPage
.
dataLength
();
...
...
store/source/stortree.hxx
Dosyayı görüntüle @
eb4cbea6
...
@@ -128,7 +128,7 @@ struct OStoreBTreeNodeData : public store::OStorePageData
...
@@ -128,7 +128,7 @@ struct OStoreBTreeNodeData : public store::OStorePageData
*/
*/
sal_uInt16
capacity
()
const
sal_uInt16
capacity
()
const
{
{
return
(
store
::
ntohs
(
base
::
m_aDescr
.
m_nSize
)
-
self
::
thePageSize
);
return
static_cast
<
sal_uInt16
>
(
store
::
ntohs
(
base
::
m_aDescr
.
m_nSize
)
-
self
::
thePageSize
);
}
}
/** capacityCount (must be even).
/** capacityCount (must be even).
...
@@ -142,7 +142,7 @@ struct OStoreBTreeNodeData : public store::OStorePageData
...
@@ -142,7 +142,7 @@ struct OStoreBTreeNodeData : public store::OStorePageData
*/
*/
sal_uInt16
usage
()
const
sal_uInt16
usage
()
const
{
{
return
(
store
::
ntohs
(
base
::
m_aDescr
.
m_nUsed
)
-
self
::
thePageSize
);
return
static_cast
<
sal_uInt16
>
(
store
::
ntohs
(
base
::
m_aDescr
.
m_nUsed
)
-
self
::
thePageSize
);
}
}
/** usageCount.
/** usageCount.
...
...
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