Skip to content

Commit a7da957

Browse files
committed
Name Link::integer as hashmap private member type.
1 parent 48f2081 commit a7da957

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

include/bitcoin/database/impl/primitives/hashhead.ipp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ namespace database {
3232
TEMPLATE
3333
CLASS::hashhead(storage& head, size_t bits) NOEXCEPT
3434
: file_(head),
35-
buckets_(system::power2<Link::integer>(bits)),
36-
mask_(system::unmask_right<Link::integer>(bits))
35+
buckets_(system::power2<integer>(bits)),
36+
mask_(system::unmask_right<integer>(bits))
3737
{
3838
}
3939

@@ -110,8 +110,8 @@ inline Link CLASS::index(const Key& key) const NOEXCEPT
110110
BC_ASSERT_MSG(is_nonzero(buckets_), "hash table requires buckets");
111111

112112
// unique_hash assumes sufficient uniqueness in low order key bytes.
113-
const auto index = possible_narrow_cast<Link::integer>(unique_hash(key));
114-
return bit_and<Link::integer>(mask_, index);
113+
const auto index = possible_narrow_cast<integer>(unique_hash(key));
114+
return bit_and<integer>(mask_, index);
115115
}
116116

117117
TEMPLATE

include/bitcoin/database/primitives/hashhead.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ class hashhead
6464
inline bool push(const bytes& current, bytes& next, const Link& index) NOEXCEPT;
6565

6666
private:
67+
using integer = Link::integer;
68+
6769
template <size_t Bytes>
6870
static auto& array_cast(memory::iterator buffer) NOEXCEPT
6971
{

0 commit comments

Comments
 (0)