Skip to content

Commit 43ec310

Browse files
committed
Backport #8433 : Improve code of class BePlusTree
1 parent 92cb6da commit 43ec310

File tree

15 files changed

+155
-191
lines changed

15 files changed

+155
-191
lines changed

src/common/classes/GenericMap.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class GenericMap : public AutoStorage
5757
typedef typename KeyValuePair::first_type KeyType;
5858
typedef typename KeyValuePair::second_type ValueType;
5959

60-
typedef BePlusTree<KeyValuePair*, KeyType, MemoryPool, FirstObjectKey<KeyValuePair>, KeyComparator> ValuesTree;
60+
typedef BePlusTree<KeyValuePair*, KeyType, FirstObjectKey<KeyValuePair>, KeyComparator> ValuesTree;
6161
typedef typename ValuesTree::Accessor TreeAccessor;
6262
typedef typename ValuesTree::ConstAccessor ConstTreeAccessor;
6363

@@ -102,10 +102,10 @@ class GenericMap : public AutoStorage
102102
friend class Accessor;
103103
friend class ConstAccessor;
104104

105-
GenericMap() : tree(&getPool()), mCount(0) { }
105+
GenericMap() : tree(getPool()), mCount(0) { }
106106

107107
explicit GenericMap(MemoryPool& a_pool)
108-
: AutoStorage(a_pool), tree(&getPool()), mCount(0)
108+
: AutoStorage(a_pool), tree(getPool()), mCount(0)
109109
{ }
110110

111111
~GenericMap()

src/common/classes/sparse_bitmap.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ class SparseBitmap : public AutoStorage
6060
public:
6161
// Default constructor, stack placement
6262
SparseBitmap() :
63-
singular(false), singular_value(0), tree(&getPool()), defaultAccessor(this)
63+
singular(false), singular_value(0), tree(getPool()), defaultAccessor(this)
6464
{ }
6565

6666
// Pooled constructor
6767
explicit SparseBitmap(MemoryPool& p) :
68-
AutoStorage(p), singular(false), singular_value(0), tree(&getPool()), defaultAccessor(this)
68+
AutoStorage(p), singular(false), singular_value(0), tree(getPool()), defaultAccessor(this)
6969
{ }
7070

7171
// Default accessor methods
@@ -225,7 +225,7 @@ class SparseBitmap : public AutoStorage
225225
}
226226
};
227227

228-
typedef BePlusTree<Bucket, T, MemoryPool, Bucket> BitmapTree;
228+
typedef BePlusTree<Bucket, T, Bucket> BitmapTree;
229229
typedef typename BitmapTree::Accessor BitmapTreeAccessor;
230230

231231
// Set if bitmap contains a single value only

0 commit comments

Comments
 (0)