Skip to content

Commit 857cd12

Browse files
committed
Rename sieve::sieve_ field to value_.
1 parent 93bc8d8 commit 857cd12

2 files changed

Lines changed: 13 additions & 13 deletions

File tree

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,20 +61,20 @@ constexpr CLASS::sieve() NOEXCEPT
6161

6262
TEMPLATE
6363
constexpr CLASS::sieve(type value) NOEXCEPT
64-
: sieve_{ value }
64+
: value_{ value }
6565
{
6666
}
6767

6868
TEMPLATE
6969
constexpr CLASS::type CLASS::value() const NOEXCEPT
7070
{
71-
return sieve_;
71+
return value_;
7272
}
7373

7474
TEMPLATE
7575
constexpr CLASS::operator CLASS::type() const NOEXCEPT
7676
{
77-
return sieve_;
77+
return value_;
7878
}
7979

8080
// protected
@@ -98,21 +98,21 @@ constexpr bool CLASS::screened(type fingerprint) const NOEXCEPT
9898
else
9999
{
100100
using namespace system;
101-
const auto row = shift_right(sieve_, screen_bits);
101+
const auto row = shift_right(value_, screen_bits);
102102
if (row == limit)
103103
{
104-
if (sieve_ == empty)
104+
if (value_ == empty)
105105
return false;
106106

107-
if (sieve_ == saturated)
107+
if (value_ == saturated)
108108
return true;
109109
}
110110

111111
// Compare masked fingerprint to sieve, for all masks of screen.
112112
for (type segment{}; segment <= row; ++segment)
113113
{
114114
const auto mask = masks(row, segment);
115-
if (bit_and(fingerprint, mask) == bit_and(sieve_, mask))
115+
if (bit_and(fingerprint, mask) == bit_and(value_, mask))
116116
return true;
117117
}
118118

@@ -131,18 +131,18 @@ constexpr bool CLASS::screen(type fingerprint) NOEXCEPT
131131
else
132132
{
133133
using namespace system;
134-
auto row = shift_right(sieve_, screen_bits);
134+
auto row = shift_right(value_, screen_bits);
135135
if (row == limit)
136136
{
137-
if (sieve_ == empty)
137+
if (value_ == empty)
138138
{
139139
// Reset empty sentinel (not screened) for first screen.
140140
zeroize(row);
141141
}
142142
else
143143
{
144144
// Sieve was full, now saturated (all screened).
145-
sieve_ = saturated;
145+
value_ = saturated;
146146
return false;
147147
}
148148
}
@@ -164,7 +164,7 @@ constexpr bool CLASS::screen(type fingerprint) NOEXCEPT
164164
const auto mask = masks(row, row);
165165

166166
// Merge incremented selector, current sieve, and new fingerprint.
167-
sieve_ = bit_or
167+
value_ = bit_or
168168
(
169169
shift_left(row, screen_bits),
170170
bit_and
@@ -173,7 +173,7 @@ constexpr bool CLASS::screen(type fingerprint) NOEXCEPT
173173
bit_or
174174
(
175175
bit_and(fingerprint, mask),
176-
bit_and(sieve_, bit_not(mask))
176+
bit_and(value_, bit_not(mask))
177177
)
178178
)
179179
);

include/bitcoin/database/primitives/sieve.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class sieve
8686
// Logically sparse, e.g. 16 x 16 = 256 table of uint32_t (1024 bytes).
8787
// Compressed to one-dimensional 136 element array of uint32_t (544 bytes).
8888
static constexpr masks_t masks_ = generate_masks();
89-
type sieve_;
89+
type value_;
9090
};
9191

9292
} // namespace database

0 commit comments

Comments
 (0)