Skip to content

Commit 4bf0431

Browse files
committed
Backport #8433 : Improve code of class BePlusTree
1 parent 332018a commit 4bf0431

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
@@ -97,7 +97,7 @@ class GenericMap : public AutoStorage
9797
typedef typename KeyValuePair::first_type KeyType;
9898
typedef typename KeyValuePair::second_type ValueType;
9999

100-
typedef BePlusTree<KeyValuePair*, KeyType, MemoryPool, FirstObjectKey<KeyValuePair>, KeyComparator> ValuesTree;
100+
typedef BePlusTree<KeyValuePair*, KeyType, FirstObjectKey<KeyValuePair>, KeyComparator> ValuesTree;
101101
typedef typename ValuesTree::Accessor TreeAccessor;
102102
typedef typename ValuesTree::ConstAccessor ConstTreeAccessor;
103103

@@ -139,10 +139,10 @@ class GenericMap : public AutoStorage
139139
friend class Accessor;
140140
friend class ConstAccessor;
141141

142-
GenericMap() : tree(&getPool()), mCount(0) { }
142+
GenericMap() : tree(getPool()), mCount(0) { }
143143

144144
explicit GenericMap(MemoryPool& a_pool)
145-
: AutoStorage(a_pool), tree(&getPool()), mCount(0)
145+
: AutoStorage(a_pool), tree(getPool()), mCount(0)
146146
{ }
147147

148148
~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)