[Libreoffice-commits] core.git: store/source

Arnaud Versini arnaud.versini at gmail.com
Wed Aug 31 07:16:32 UTC 2016


 store/source/storbase.hxx |    9 ---------
 store/source/storcach.hxx |    2 +-
 2 files changed, 1 insertion(+), 10 deletions(-)

New commits:
commit e53bb6a0f0257da68790437d7ac39a7e103fe9ea
Author: Arnaud Versini <arnaud.versini at gmail.com>
Date:   Tue Aug 30 21:03:38 2016 +0200

    store: remove STORE_IMPL_ISP2 and STORE_IMPL_CONCAT.
    
    Change-Id: Iec6cff8da24515f17a5ad2b9ba6e1f92df124921
    Reviewed-on: https://gerrit.libreoffice.org/28508
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
    Tested-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/store/source/storbase.hxx b/store/source/storbase.hxx
index c280e5d..6606f55 100644
--- a/store/source/storbase.hxx
+++ b/store/source/storbase.hxx
@@ -44,15 +44,6 @@
  *
  *======================================================================*/
 
-#ifndef STORE_IMPL_ISP2
-#define STORE_IMPL_ISP2(value) (((value) & ((value) - 1)) == 0)
-#endif
-
-#ifndef STORE_IMPL_CONCAT
-#define STORE_IMPL_CONCAT(x, y) STORE_IMPL_CONCAT2(x,y)
-#define STORE_IMPL_CONCAT2(x, y) x##y
-#endif
-
 namespace store
 {
 
diff --git a/store/source/storcach.hxx b/store/source/storcach.hxx
index bc53fd6..0993397 100644
--- a/store/source/storcach.hxx
+++ b/store/source/storcach.hxx
@@ -43,7 +43,7 @@ class PageCache :
 {
     // Representation
     static size_t const theTableSize = 32;
-    static_assert(STORE_IMPL_ISP2(theTableSize), "must be the case");
+    static_assert((theTableSize & (theTableSize-1)) == 0, "table size should be a power of 2");
 
     Entry **     m_hash_table;
     Entry *      m_hash_table_0[theTableSize];


More information about the Libreoffice-commits mailing list