Skip to content

Commit 6a11b17

Browse files
committed
Don't use brace init in vector(size) construct.
1 parent f456dca commit 6a11b17

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/chain/block.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ bool block::is_forward_reference() const NOEXCEPT
404404
if (txs_->empty())
405405
return false;
406406

407-
unordered_set_of_hash_cref hashes{ sub1(txs_->size()) };
407+
unordered_set_of_hash_cref hashes(sub1(txs_->size()));
408408
for (auto tx = txs_->rbegin(); tx != std::prev(txs_->rend()); ++tx)
409409
{
410410
for (const auto& in: *(*tx)->inputs_ptr())
@@ -425,7 +425,7 @@ bool block::is_internal_double_spend() const NOEXCEPT
425425
if (txs_->empty())
426426
return false;
427427

428-
unordered_set_of_point_cref points{ spends() };
428+
unordered_set_of_point_cref points(spends());
429429
for (auto tx = std::next(txs_->begin()); tx != txs_->end(); ++tx)
430430
for (const auto& in: *(*tx)->inputs_ptr())
431431
if (!points.emplace(in->point()).second)
@@ -507,7 +507,7 @@ bool block::is_hash_limit_exceeded() const NOEXCEPT
507507
return false;
508508

509509
// A set is used to collapse duplicates.
510-
unordered_set_of_hash_cref hashes{ txs_->size() };
510+
unordered_set_of_hash_cref hashes(txs_->size());
511511

512512
// Just the coinbase tx hash, skip its null input hashes.
513513
hashes.emplace(txs_->front()->get_hash(false));
@@ -769,7 +769,7 @@ void block::populate() const NOEXCEPT
769769
if (txs_->empty())
770770
return;
771771

772-
unordered_map_of_cref_point_to_output_cptr_cref points{ outputs() };
772+
unordered_map_of_cref_point_to_output_cptr_cref points(outputs());
773773
uint32_t index{};
774774

775775
// Populate outputs hash table (coinbase included).
@@ -798,7 +798,7 @@ code block::populate_with_metadata(const chain::context& ctx) const NOEXCEPT
798798
return error::block_success;
799799

800800
const auto bip68 = ctx.is_enabled(chain::flags::bip68_rule);
801-
unordered_map_of_cref_point_to_output_cptr_cref points{ outputs() };
801+
unordered_map_of_cref_point_to_output_cptr_cref points(outputs());
802802
uint32_t index{};
803803

804804
// Populate outputs hash table (coinbase included).

0 commit comments

Comments
 (0)