Changed the use of boost:value_initialized for C++ list initializer

This commit is contained in:
Jesus Ramirez 2019-06-26 10:39:41 -04:00 committed by Lev Sizov
parent 98af2e954b
commit 2cd4fd8972
13 changed files with 35 additions and 35 deletions

View file

@ -529,7 +529,7 @@ bool gen_tx_key_image_not_derive_from_tx_key::generate(std::vector<test_event_en
// Tx with invalid key image can't be subscribed, so create empty signature
builder.m_tx.signatures.resize(1);
builder.m_tx.signatures[0].resize(1);
builder.m_tx.signatures[0][0] = boost::value_initialized<crypto::signature>();
builder.m_tx.signatures[0][0] = crypto::signature{};
DO_CALLBACK(events, "mark_invalid_tx");
events.push_back(builder.m_tx);
@ -562,7 +562,7 @@ bool gen_tx_key_image_is_invalid::generate(std::vector<test_event_entry>& events
// Tx with invalid key image can't be subscribed, so create empty signature
builder.m_tx.signatures.resize(1);
builder.m_tx.signatures[0].resize(1);
builder.m_tx.signatures[0][0] = boost::value_initialized<crypto::signature>();
builder.m_tx.signatures[0][0] = crypto::signature{};
DO_CALLBACK(events, "mark_invalid_tx");
events.push_back(builder.m_tx);

View file

@ -253,7 +253,7 @@ bool transactions_flow_test(std::string& working_folder,
transfered_money += amount_to_tx;
LOG_PRINT_L0("transferred " << amount_to_tx << ", i=" << i );
tx_test_entry& ent = txs[get_transaction_hash(tx)] = boost::value_initialized<tx_test_entry>();
tx_test_entry& ent = txs[get_transaction_hash(tx)] = tx_test_entry{};
ent.amount_transfered = amount_to_tx;
ent.tx = tx;
//if(i % transactions_per_second)

View file

@ -42,7 +42,7 @@ TEST(protocol_pack, protocol_pack_command)
r.total_height = 3;
for(int i = 1; i < 10000; i += i*10)
{
r.m_block_ids.resize(i, boost::value_initialized<crypto::hash>());
r.m_block_ids.resize(i, crypto::hash{});
bool res = epee::serialization::store_t_to_binary(r, buff);
ASSERT_TRUE(res);