summaryrefslogtreecommitdiff
path: root/store
diff options
context:
space:
mode:
Diffstat (limited to 'store')
-rw-r--r--store/Library_store.mk2
-rw-r--r--store/source/storbase.hxx21
-rw-r--r--store/source/storbios.cxx5
-rw-r--r--store/source/storcach.cxx7
-rw-r--r--store/source/stordata.hxx9
-rw-r--r--store/source/stortree.hxx5
-rw-r--r--store/workben/t_page.cxx5
7 files changed, 29 insertions, 25 deletions
diff --git a/store/Library_store.mk b/store/Library_store.mk
index 09546926fe03..fabac105cfd7 100644
--- a/store/Library_store.mk
+++ b/store/Library_store.mk
@@ -28,6 +28,8 @@ $(eval $(call gb_Library_Library,store))
$(eval $(call gb_Library_set_soversion_script,store,3,$(SRCDIR)/store/util/store.map))
+$(eval $(call gb_Library_use_external,store,boost_headers))
+
$(eval $(call gb_Library_use_packages,store,\
store_odk_headers \
))
diff --git a/store/source/storbase.hxx b/store/source/storbase.hxx
index 7c07dbad0cf1..cbd4fc55a888 100644
--- a/store/source/storbase.hxx
+++ b/store/source/storbase.hxx
@@ -20,6 +20,9 @@
#ifndef _STORE_STORBASE_HXX_
#define _STORE_STORBASE_HXX_
+#include "sal/config.h"
+
+#include "boost/static_assert.hpp"
#include "sal/types.h"
#include "rtl/alloc.h"
@@ -49,22 +52,6 @@
#define STORE_IMPL_CONCAT2(x, y) x##y
#endif
-#ifndef STORE_STATIC_ASSERT /* Compile time assertion */
-namespace store
-{
- template< bool x > struct STATIC_ASSERTION_FAILURE;
- template<> struct STATIC_ASSERTION_FAILURE< true > { enum { value = 1 }; };
-
- template< int x > struct static_assert_test{};
-} // namespace store
-
-#define STORE_STATIC_ASSERT(pred) \
-typedef \
-store::static_assert_test< sizeof( store::STATIC_ASSERTION_FAILURE< (bool)(pred) > ) > \
-STORE_IMPL_CONCAT(static_assert_typedef_, __LINE__)
-
-#endif /* !STORE_STATIC_ASSERT */
-
namespace store
{
@@ -437,7 +424,7 @@ struct PageData
*/
static const size_t theSize = sizeof(G) + sizeof(D) + 2 * sizeof(L);
static const sal_uInt16 thePageSize = theSize;
- STORE_STATIC_ASSERT(STORE_MINIMUM_PAGESIZE >= thePageSize);
+ BOOST_STATIC_ASSERT(STORE_MINIMUM_PAGESIZE >= thePageSize);
/** location.
*/
diff --git a/store/source/storbios.cxx b/store/source/storbios.cxx
index 2cdbecee9b33..b773c5d20397 100644
--- a/store/source/storbios.cxx
+++ b/store/source/storbios.cxx
@@ -17,6 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include "sal/config.h"
+
+#include "boost/static_assert.hpp"
#include "storbios.hxx"
@@ -182,7 +185,7 @@ struct SuperBlockPage
*/
static const size_t theSize = 2 * SuperBlock::theSize;
static const sal_uInt16 thePageSize = theSize;
- STORE_STATIC_ASSERT(STORE_MINIMUM_PAGESIZE >= thePageSize);
+ BOOST_STATIC_ASSERT(STORE_MINIMUM_PAGESIZE >= thePageSize);
/** Allocation.
*/
diff --git a/store/source/storcach.cxx b/store/source/storcach.cxx
index e07aa7f1791c..481177e0c831 100644
--- a/store/source/storcach.cxx
+++ b/store/source/storcach.cxx
@@ -17,6 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include "sal/config.h"
+
+#include "boost/static_assert.hpp"
#include "storcach.hxx"
@@ -256,7 +259,7 @@ class PageCache_Impl :
/** Representation.
*/
static size_t const theTableSize = 32;
- STORE_STATIC_ASSERT(STORE_IMPL_ISP2(theTableSize));
+ BOOST_STATIC_ASSERT(STORE_IMPL_ISP2(theTableSize));
Entry ** m_hash_table;
Entry * m_hash_table_0[theTableSize];
@@ -330,7 +333,7 @@ PageCache_Impl::PageCache_Impl (sal_uInt16 nPageSize)
m_nMissed (0)
{
static size_t const theSize = SAL_N_ELEMENTS(m_hash_table_0);
- STORE_STATIC_ASSERT(theSize == theTableSize);
+ BOOST_STATIC_ASSERT(theSize == theTableSize);
memset(m_hash_table_0, 0, sizeof(m_hash_table_0));
}
diff --git a/store/source/stordata.hxx b/store/source/stordata.hxx
index cbd004482e47..88f8f74acb41 100644
--- a/store/source/stordata.hxx
+++ b/store/source/stordata.hxx
@@ -20,6 +20,9 @@
#ifndef _STORE_STORDATA_HXX_
#define _STORE_STORDATA_HXX_
+#include "sal/config.h"
+
+#include "boost/static_assert.hpp"
#include "sal/types.h"
#include "sal/macros.h"
@@ -55,7 +58,7 @@ struct OStoreDataPageData : public store::OStorePageData
*/
static const size_t theSize = 0;
static const sal_uInt16 thePageSize = base::theSize + self::theSize;
- STORE_STATIC_ASSERT(STORE_MINIMUM_PAGESIZE >= self::thePageSize);
+ BOOST_STATIC_ASSERT(STORE_MINIMUM_PAGESIZE >= self::thePageSize);
/** capacity.
*/
@@ -145,7 +148,7 @@ struct OStoreIndirectionPageData : public store::OStorePageData
*/
static const size_t theSize = sizeof(G);
static const sal_uInt16 thePageSize = base::theSize + self::theSize;
- STORE_STATIC_ASSERT(STORE_MINIMUM_PAGESIZE >= self::thePageSize);
+ BOOST_STATIC_ASSERT(STORE_MINIMUM_PAGESIZE >= self::thePageSize);
/** capacity.
*/
@@ -570,7 +573,7 @@ struct OStoreDirectoryPageData : public store::OStorePageData
*/
static const size_t theSize = NameBlock::theSize + DataBlock::theSize;
static const sal_uInt16 thePageSize = base::theSize + self::theSize;
- STORE_STATIC_ASSERT(STORE_MINIMUM_PAGESIZE >= self::thePageSize);
+ BOOST_STATIC_ASSERT(STORE_MINIMUM_PAGESIZE >= self::thePageSize);
/** capacity.
*/
diff --git a/store/source/stortree.hxx b/store/source/stortree.hxx
index f057bac79588..54768a1d0008 100644
--- a/store/source/stortree.hxx
+++ b/store/source/stortree.hxx
@@ -20,6 +20,9 @@
#ifndef _STORE_STORTREE_HXX
#define _STORE_STORTREE_HXX
+#include "sal/config.h"
+
+#include "boost/static_assert.hpp"
#include "sal/types.h"
#include "store/types.h"
@@ -120,7 +123,7 @@ struct OStoreBTreeNodeData : public store::OStorePageData
*/
static const size_t theSize = sizeof(G);
static const sal_uInt16 thePageSize = base::theSize + self::theSize;
- STORE_STATIC_ASSERT(STORE_MINIMUM_PAGESIZE >= self::thePageSize);
+ BOOST_STATIC_ASSERT(STORE_MINIMUM_PAGESIZE >= self::thePageSize);
/** capacity.
*/
diff --git a/store/workben/t_page.cxx b/store/workben/t_page.cxx
index 95e248a27f91..8abbd563ba24 100644
--- a/store/workben/t_page.cxx
+++ b/store/workben/t_page.cxx
@@ -17,6 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include "sal/config.h"
+
+#include "boost/static_assert.hpp"
#include "osl/diagnose.h"
#include "rtl/alloc.h"
#include "rtl/ref.hxx"
@@ -156,7 +159,7 @@ struct PageData
*/
static const size_t theSize = sizeof(G) + sizeof(D) + 2 * sizeof(L);
static const sal_uInt16 thePageSize = theSize;
- STORE_STATIC_ASSERT(STORE_MINIMUM_PAGESIZE >= thePageSize);
+ BOOST_STATIC_ASSERT(STORE_MINIMUM_PAGESIZE >= thePageSize);
/** type.
*/