diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:15:11 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:15:11 +0100 |
commit | 0b0a6e9b4d99a647d12b25f608150bf652d3f9da (patch) | |
tree | 5a5bb7a70c9ecfbfd930a4c21416043f6eb06640 /store | |
parent | dd68ebadd038dd99057580a89ecdd44124ac7a77 (diff) |
More loplugin:cstylecast: store
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files
Change-Id: Ie71dbe8077e1467a93fda3c92cce178e53ecb2f4
Diffstat (limited to 'store')
-rw-r--r-- | store/source/storbase.hxx | 2 | ||||
-rw-r--r-- | store/source/stordata.cxx | 20 | ||||
-rw-r--r-- | store/source/stordata.hxx | 18 | ||||
-rw-r--r-- | store/source/store.cxx | 2 | ||||
-rw-r--r-- | store/source/stortree.cxx | 4 |
5 files changed, 23 insertions, 23 deletions
diff --git a/store/source/storbase.hxx b/store/source/storbase.hxx index 5cb9d2e526e0..6e683eb4db09 100644 --- a/store/source/storbase.hxx +++ b/store/source/storbase.hxx @@ -114,7 +114,7 @@ struct OStorePageGuard } }; -#define STORE_PAGE_NULL ((sal_uInt32)(~0)) +#define STORE_PAGE_NULL (sal_uInt32(~0)) struct OStorePageDescriptor { diff --git a/store/source/stordata.cxx b/store/source/stordata.cxx index d18592fd2bff..4b680a504cb1 100644 --- a/store/source/stordata.cxx +++ b/store/source/stordata.cxx @@ -601,7 +601,7 @@ OStoreDirectoryPageObject::scope ( index0 = nPage; // Setup LinkDescriptor indices. - rDescr.m_nIndex0 = (sal_uInt16)(index0 & 0xffff); + rDescr.m_nIndex0 = static_cast<sal_uInt16>(index0 & 0xffff); // Done. return page::SCOPE_DIRECT; @@ -630,8 +630,8 @@ OStoreDirectoryPageObject::scope ( } // Setup LinkDescriptor indices. - rDescr.m_nIndex0 = (sal_uInt16)(index0 & 0xffff); - rDescr.m_nIndex1 = (sal_uInt16)(index1 & 0xffff); + rDescr.m_nIndex0 = static_cast<sal_uInt16>(index0 & 0xffff); + rDescr.m_nIndex1 = static_cast<sal_uInt16>(index1 & 0xffff); // Done. return page::SCOPE_SINGLE; @@ -664,9 +664,9 @@ OStoreDirectoryPageObject::scope ( } // Setup LinkDescriptor indices. - rDescr.m_nIndex0 = (sal_uInt16)(index0 & 0xffff); - rDescr.m_nIndex1 = (sal_uInt16)(index1 & 0xffff); - rDescr.m_nIndex2 = (sal_uInt16)(index2 & 0xffff); + rDescr.m_nIndex0 = static_cast<sal_uInt16>(index0 & 0xffff); + rDescr.m_nIndex1 = static_cast<sal_uInt16>(index1 & 0xffff); + rDescr.m_nIndex2 = static_cast<sal_uInt16>(index2 & 0xffff); // Done. return page::SCOPE_DOUBLE; @@ -704,10 +704,10 @@ OStoreDirectoryPageObject::scope ( } // Setup LinkDescriptor indices. - rDescr.m_nIndex0 = (sal_uInt16)(index0 & 0xffff); - rDescr.m_nIndex1 = (sal_uInt16)(index1 & 0xffff); - rDescr.m_nIndex2 = (sal_uInt16)(index2 & 0xffff); - rDescr.m_nIndex3 = (sal_uInt16)(index3 & 0xffff); + rDescr.m_nIndex0 = static_cast<sal_uInt16>(index0 & 0xffff); + rDescr.m_nIndex1 = static_cast<sal_uInt16>(index1 & 0xffff); + rDescr.m_nIndex2 = static_cast<sal_uInt16>(index2 & 0xffff); + rDescr.m_nIndex3 = static_cast<sal_uInt16>(index3 & 0xffff); // Done. return page::SCOPE_TRIPLE; diff --git a/store/source/stordata.hxx b/store/source/stordata.hxx index c992038bb3ac..de587c144a9b 100644 --- a/store/source/stordata.hxx +++ b/store/source/stordata.hxx @@ -340,10 +340,10 @@ struct OStoreDirectoryDataBlock /** Construction. */ LinkDescriptor() - : m_nIndex0 ((sal_uInt16)(~0)), - m_nIndex1 ((sal_uInt16)(~0)), - m_nIndex2 ((sal_uInt16)(~0)), - m_nIndex3 ((sal_uInt16)(~0)) + : m_nIndex0 (sal_uInt16(~0)), + m_nIndex1 (sal_uInt16(~0)), + m_nIndex2 (sal_uInt16(~0)), + m_nIndex3 (sal_uInt16(~0)) {} }; @@ -417,7 +417,7 @@ struct OStoreDirectoryDataBlock /** direct. */ - static const sal_uInt16 directCount = (sal_uInt16)(STORE_LIMIT_DATAPAGE_DIRECT); + static const sal_uInt16 directCount = sal_uInt16(STORE_LIMIT_DATAPAGE_DIRECT); sal_uInt32 directLink (sal_uInt16 nIndex) const { @@ -434,7 +434,7 @@ struct OStoreDirectoryDataBlock /** single. */ - static const sal_uInt16 singleCount = (sal_uInt16)(STORE_LIMIT_DATAPAGE_SINGLE); + static const sal_uInt16 singleCount = sal_uInt16(STORE_LIMIT_DATAPAGE_SINGLE); sal_uInt32 singleLink (sal_uInt16 nIndex) const { @@ -451,7 +451,7 @@ struct OStoreDirectoryDataBlock /** double. */ - static const sal_uInt16 doubleCount = (sal_uInt16)(STORE_LIMIT_DATAPAGE_DOUBLE); + static const sal_uInt16 doubleCount = sal_uInt16(STORE_LIMIT_DATAPAGE_DOUBLE); sal_uInt32 doubleLink (sal_uInt16 nIndex) const { @@ -468,7 +468,7 @@ struct OStoreDirectoryDataBlock /** triple. */ - static const sal_uInt16 tripleCount = (sal_uInt16)(STORE_LIMIT_DATAPAGE_TRIPLE); + static const sal_uInt16 tripleCount = sal_uInt16(STORE_LIMIT_DATAPAGE_TRIPLE); sal_uInt32 tripleLink (sal_uInt16 nIndex) const { @@ -561,7 +561,7 @@ struct OStoreDirectoryPageData : public store::PageData ChunkDescriptor (sal_uInt32 nPosition, sal_uInt16 nCapacity) { m_nPage = nPosition / nCapacity; - m_nOffset = (sal_uInt16)((nPosition % nCapacity) & 0xffff); + m_nOffset = static_cast<sal_uInt16>((nPosition % nCapacity) & 0xffff); m_nLength = nCapacity - m_nOffset; } }; diff --git a/store/source/store.cxx b/store/source/store.cxx index a7c7a7ae1099..2f2b4bed4763 100644 --- a/store/source/store.cxx +++ b/store/source/store.cxx @@ -265,7 +265,7 @@ storeError store_findFirst ( memset (pFindData, 0, sizeof (storeFindData)); // Find first. - pFindData->m_nReserved = (sal_uInt32)(~0); + pFindData->m_nReserved = sal_uInt32(~0); return xDirectory->iterate (*pFindData); } diff --git a/store/source/stortree.cxx b/store/source/stortree.cxx index 8733e9bf12bf..e4b577393373 100644 --- a/store/source/stortree.cxx +++ b/store/source/stortree.cxx @@ -72,14 +72,14 @@ sal_uInt16 OStoreBTreeNodeData::find (const T& t) const sal_Int32 const m = ((l + r) >> 1); if (t.m_aKey == m_pData[m].m_aKey) - return (sal_uInt16)m; + return static_cast<sal_uInt16>(m); if (t.m_aKey < m_pData[m].m_aKey) r = m - 1; else l = m + 1; } - sal_uInt16 const k = (sal_uInt16)r; + sal_uInt16 const k = static_cast<sal_uInt16>(r); if ((k < capacityCount()) && (t.m_aKey < m_pData[k].m_aKey)) return k - 1; else |