diff options
| author | Riccardo Spagni <ric@spagni.net> | 2017-02-02 18:16:38 +0200 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2017-02-02 18:16:39 +0200 |
| commit | f9e60dcd551b9f5b4a86a730d0abfc97a6767519 (patch) | |
| tree | e1613849aa7a66b11876a03b081c4cc4f6450ca8 /src/cryptonote_core/cryptonote_core.cpp | |
| parent | 05de1bc398178decc6a46c0b4a0da3975339cc89 (diff) | |
| parent | 0644eed7728d3b5146ca7b53f7c50a56b02b327b (diff) | |
| download | monzero-core-f9e60dcd551b9f5b4a86a730d0abfc97a6767519.tar.gz monzero-core-f9e60dcd551b9f5b4a86a730d0abfc97a6767519.tar.xz monzero-core-f9e60dcd551b9f5b4a86a730d0abfc97a6767519.zip | |
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)
Diffstat (limited to 'src/cryptonote_core/cryptonote_core.cpp')
| -rw-r--r-- | src/cryptonote_core/cryptonote_core.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index 22d473b35..ef473cfba 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -31,7 +31,6 @@ #include "include_base_utils.h" using namespace epee; -#include <boost/foreach.hpp> #include <unordered_set> #include "cryptonote_core.h" #include "common/command_line.h" @@ -668,7 +667,7 @@ namespace cryptonote bool core::are_key_images_spent(const std::vector<crypto::key_image>& key_im, std::vector<bool> &spent) const { spent.clear(); - BOOST_FOREACH(auto& ki, key_im) + for(auto& ki: key_im) { spent.push_back(m_blockchain_storage.have_tx_keyimg_as_spent(ki)); } @@ -681,14 +680,14 @@ namespace cryptonote uint64_t emission_amount = 0; uint64_t total_fee_amount = 0; this->get_blocks(start_offset, count, blocks); - BOOST_FOREACH(auto& b, blocks) + for(auto& b: blocks) { std::list<transaction> txs; std::list<crypto::hash> missed_txs; uint64_t coinbase_amount = get_outs_money_amount(b.miner_tx); this->get_transactions(b.tx_hashes, txs, missed_txs); uint64_t tx_fee_amount = 0; - BOOST_FOREACH(const auto& tx, txs) + for(const auto& tx: txs) { tx_fee_amount += get_tx_fee(tx); } @@ -703,7 +702,7 @@ namespace cryptonote bool core::check_tx_inputs_keyimages_diff(const transaction& tx) const { std::unordered_set<crypto::key_image> ki; - BOOST_FOREACH(const auto& in, tx.vin) + for(const auto& in: tx.vin) { CHECKED_GET_SPECIFIC_VARIANT(in, const txin_to_key, tokey_in, false); if(!ki.insert(tokey_in.k_image).second) @@ -869,7 +868,7 @@ namespace cryptonote block_to_blob(b, arg.b.block); //pack transactions - BOOST_FOREACH(auto& tx, txs) + for(auto& tx: txs) arg.b.txs.push_back(t_serializable_object_to_blob(tx)); m_pprotocol->relay_block(arg, exclude_context); |
