Skip to content

Commit 4df2d0c

Browse files
committed
Merge bitcoin/bitcoin#29983: msvc: Compile test\fuzz\bitdeque.cpp
774359b build, msvc: Compile `test\fuzz\bitdeque.cpp` (Hennadii Stepanov) 85f50a4 refactor: Fix "error C2248: cannot access private member" on MSVC (Hennadii Stepanov) Pull request description: This PR resolves one point from the bitcoin/bitcoin#29774 (comment): > What is the issue with the bitdeque... ? ACKs for top commit: maflcko: lgtm ACK 774359b sipa: utACK 774359b achow101: ACK 774359b dergoegge: utACK 774359b Tree-SHA512: dba5c0217b915468af08475795437a10d8e8dedfadeb319f36d9b1bf54a91a8b2c61470a6047565855276c2bc8589c7776dc19237610b65b57cc841a303de8b3
2 parents 063072b + 774359b commit 4df2d0c

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

build_msvc/fuzz/fuzz.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
1010
</PropertyGroup>
1111
<ItemGroup>
12-
<!-- TODO: Fix the code and remove bitdeque.cpp and miniscript.cpp exclusion. -->
13-
<ClCompile Include="..\..\src\test\fuzz\*.cpp" Exclude="..\..\src\test\fuzz\bitdeque.cpp;..\..\src\test\fuzz\miniscript.cpp" />
12+
<!-- TODO: Fix the code and remove miniscript.cpp exclusion. -->
13+
<ClCompile Include="..\..\src\test\fuzz\*.cpp" Exclude="..\..\src\test\fuzz\miniscript.cpp" />
1414
<ClCompile Include="..\..\src\test\fuzz\util\descriptor.cpp">
1515
<ObjectFileName>$(IntDir)test_fuzz_util_descriptor.obj</ObjectFileName>
1616
</ClCompile>

src/util/bitdeque.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,17 @@
1414

1515
/** Class that mimics std::deque<bool>, but with std::vector<bool>'s bit packing.
1616
*
17-
* BlobSize selects the (minimum) number of bits that are allocated at once.
17+
* BITS_PER_WORD selects the (minimum) number of bits that are allocated at once.
1818
* Larger values reduce the asymptotic memory usage overhead, at the cost of
1919
* needing larger up-front allocations. The default is 4096 bytes.
2020
*/
21-
template<int BlobSize = 4096 * 8>
21+
template<int BITS_PER_WORD = 4096 * 8>
2222
class bitdeque
2323
{
2424
// Internal definitions
25-
using word_type = std::bitset<BlobSize>;
25+
using word_type = std::bitset<BITS_PER_WORD>;
2626
using deque_type = std::deque<word_type>;
27-
static_assert(BlobSize > 0);
28-
static constexpr int BITS_PER_WORD = BlobSize;
27+
static_assert(BITS_PER_WORD > 0);
2928

3029
// Forward and friend declarations of iterator types.
3130
template<bool Const> class Iterator;

0 commit comments

Comments
 (0)