Skip to content

Commit f3e2969

Browse files
committed
Fix missing typenames.
1 parent d1ed3f8 commit f3e2969

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ Link CLASS::at(size_t key) const NOEXCEPT
134134
// Reads full padded word.
135135
const auto raw = ptr->data();
136136
// xcode clang++16 does not support C++20 std::atomic_ref.
137-
////const std::atomic_ref<Link::integer> head(unsafe_byte_cast<Link::integer>(raw));
138-
const auto& head = *pointer_cast<std::atomic<Link::integer>>(raw);
137+
////const std::atomic_ref<integer> head(unsafe_byte_cast<integer>(raw));
138+
const auto& head = *pointer_cast<std::atomic<integer>>(raw);
139139
return head.load(std::memory_order_relaxed);
140140
}
141141
else
@@ -164,8 +164,8 @@ bool CLASS::push(const Link& link, const Link& index) NOEXCEPT
164164
// Writes full padded word (0x00 fill).
165165
const auto raw = ptr->data();
166166
// xcode clang++16 does not support C++20 std::atomic_ref.
167-
////const std::atomic_ref<Link::integer> head(unsafe_byte_cast<Link::integer>(raw));
168-
auto& head = *pointer_cast<std::atomic<Link::integer>>(raw);
167+
////const std::atomic_ref<integer> head(unsafe_byte_cast<integer>(raw));
168+
auto& head = *pointer_cast<std::atomic<integer>>(raw);
169169
head.store(link, std::memory_order_relaxed);
170170
}
171171
else

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,9 @@ constexpr Link CLASS::position_to_link(size_t position) NOEXCEPT
168168
}
169169

170170
TEMPLATE
171-
constexpr typename Link::integer CLASS::cast_link(size_t link) NOEXCEPT
171+
constexpr CLASS::integer CLASS::cast_link(size_t link) NOEXCEPT
172172
{
173173
using namespace system;
174-
using integer = typename Link::integer;
175174
constexpr auto terminal = Link::terminal;
176175

177176
// link limit is sub1(terminal), where terminal is 2^((8*Link::bytes)-1).

include/bitcoin/database/primitives/arrayhead.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ class arrayhead
7171
bool push(const Link& link, const Link& index) NOEXCEPT;
7272

7373
private:
74+
using integer = Link::integer;
7475
using body = manager<Link, system::data_array<zero>, Link::size>;
75-
static_assert(std::atomic<Link::integer>::is_always_lock_free);
76+
static_assert(std::atomic<integer>::is_always_lock_free);
7677
static_assert(is_nonzero(Link::size));
77-
static constexpr auto bucket_size = Align ? sizeof(Link::integer) :
78-
Link::size;
78+
static constexpr auto bucket_size = Align ? sizeof(integer) : Link::size;
7979

8080
template <size_t Bytes>
8181
static inline auto& to_array(memory::iterator it) NOEXCEPT
@@ -88,7 +88,7 @@ class arrayhead
8888
using namespace system;
8989
const auto offset = floored_divide(position, bucket_size);
9090
const auto link = floored_subtract(offset, one);
91-
return possible_narrow_cast<Link::integer>(link);
91+
return possible_narrow_cast<integer>(link);
9292
}
9393

9494
// Byte offset of bucket index within head file.

include/bitcoin/database/primitives/manager.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ template <class Link, class Key, size_t Size>
3535
class manager
3636
{
3737
public:
38+
using integer = typename Link::integer;
3839
static constexpr Link position_to_link(size_t position) NOEXCEPT;
3940
static constexpr size_t link_to_position(const Link& link) NOEXCEPT;
40-
static constexpr typename Link::integer cast_link(size_t link) NOEXCEPT;
41+
static constexpr integer cast_link(size_t link) NOEXCEPT;
4142

4243
DEFAULT_COPY_MOVE_DESTRUCT(manager);
4344

0 commit comments

Comments
 (0)