Merge pull request #1617

0644eed7 Remove boost/foreach.cpp includes (Miguel Herranz)
36dd3e23 Replace BOOST_REVERSE_FOREACH with ranged for (Miguel Herranz)
629e3101 Replace BOOST_FOREACH with C++11 ranged for (Miguel Herranz)
This commit is contained in:
Riccardo Spagni 2017-02-02 18:16:38 +02:00
commit f9e60dcd55
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD
20 changed files with 84 additions and 94 deletions

View file

@ -52,7 +52,6 @@
#include "../../contrib/epee/include/net/net_utils_base.h"
#include "../../contrib/epee/include/misc_log_ex.h"
#include <boost/lambda/bind.hpp>
#include <boost/foreach.hpp>
#include <boost/lambda/lambda.hpp>
#include <boost/uuid/random_generator.hpp>
#include <boost/chrono.hpp>

View file

@ -411,7 +411,7 @@ namespace cryptonote
transaction tx;
crypto::hash tx_hash;
BOOST_FOREACH(auto& tx_blob, arg.b.txs)
for(auto& tx_blob: arg.b.txs)
{
if(parse_and_validate_tx_from_blob(tx_blob, tx))
{
@ -527,7 +527,7 @@ namespace cryptonote
}
size_t tx_idx = 0;
BOOST_FOREACH(auto& tx_hash, new_block.tx_hashes)
for(auto& tx_hash: new_block.tx_hashes)
{
if(m_core.get_pool_transaction(tx_hash, tx))
{
@ -638,7 +638,7 @@ namespace cryptonote
fluffy_response.current_blockchain_height = m_core.get_current_blockchain_height();
fluffy_response.hop = arg.hop;
size_t local_txs_count = local_txs.size();
BOOST_FOREACH(auto& tx_idx, arg.missing_tx_indices)
for(auto& tx_idx: arg.missing_tx_indices)
{
if(tx_idx < local_txs_count)
{
@ -790,7 +790,7 @@ namespace cryptonote
context.m_remote_blockchain_height = arg.current_blockchain_height;
size_t count = 0;
BOOST_FOREACH(const block_complete_entry& block_entry, arg.blocks)
for(const block_complete_entry& block_entry: arg.blocks)
{
if (m_stopping)
{
@ -859,7 +859,7 @@ namespace cryptonote
uint64_t previous_height = m_core.get_current_blockchain_height();
m_core.prepare_handle_incoming_blocks(arg.blocks);
BOOST_FOREACH(const block_complete_entry& block_entry, arg.blocks)
for(const block_complete_entry& block_entry: arg.blocks)
{
if (m_stopping)
{
@ -869,7 +869,7 @@ namespace cryptonote
// process transactions
TIME_MEASURE_START(transactions_process_time);
BOOST_FOREACH(auto& tx_blob, block_entry.txs)
for(auto& tx_blob: block_entry.txs)
{
tx_verification_context tvc = AUTO_VAL_INIT(tvc);
m_core.handle_incoming_tx(tx_blob, tvc, true, true, false);
@ -1077,7 +1077,7 @@ namespace cryptonote
m_p2p->drop_connection(context);
}
BOOST_FOREACH(auto& bl_id, arg.m_block_ids)
for(auto& bl_id: arg.m_block_ids)
{
if(!m_core.have_block(bl_id))
context.m_needed_objects.push_back(bl_id);