diff options
author | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2020-11-20 00:14:32 +0100 |
---|---|---|
committer | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2021-01-31 17:35:16 +0100 |
commit | e829c9afbf75e930db6c3fe77a269b0af5e7a3ad (patch) | |
tree | 6623bb198d779b51ebf6611c8a01709dba9a50d0 /src/test/miner_tests.cpp | |
parent | 365539c84691d470b44d35df374d8c049f8c1192 (diff) | |
download | bitcoin-e829c9afbf75e930db6c3fe77a269b0af5e7a3ad.tar.xz |
refactor: replace sizeof(a)/sizeof(a[0]) by std::size (C++17)
Removes the macro ARRAYLEN and also substitutes all other uses of the same
"sizeof(a)/sizeof(a[0])" pattern by std::size, available since C++17.
Diffstat (limited to 'src/test/miner_tests.cpp')
-rw-r--r-- | src/test/miner_tests.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp index 3e90bb054b..80382be682 100644 --- a/src/test/miner_tests.cpp +++ b/src/test/miner_tests.cpp @@ -216,7 +216,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) // We can't make transactions until we have inputs // Therefore, load 110 blocks :) - static_assert(sizeof(blockinfo) / sizeof(*blockinfo) == 110, "Should have 110 blocks to import"); + static_assert(std::size(blockinfo) == 110, "Should have 110 blocks to import"); int baseheight = 0; std::vector<CTransactionRef> txFirst; for (const auto& bi : blockinfo) { |