diff options
| author | Miguel Herranz <miguel@ipglider.org> | 2017-01-22 21:38:10 +0100 |
|---|---|---|
| committer | Miguel Herranz <miguel@ipglider.org> | 2017-01-22 21:38:10 +0100 |
| commit | 629e3101ab54edfcadc42c6f3d7ea9c4fa3f9a93 (patch) | |
| tree | f97194d4084995eda8bb10fd776881c49e1d9d88 /src/cryptonote_core/cryptonote_core.cpp | |
| parent | daf66621dcf43f36067465a1f1c99f5b1390c400 (diff) | |
| download | monzero-core-629e3101ab54edfcadc42c6f3d7ea9c4fa3f9a93.tar.gz monzero-core-629e3101ab54edfcadc42c6f3d7ea9c4fa3f9a93.tar.xz monzero-core-629e3101ab54edfcadc42c6f3d7ea9c4fa3f9a93.zip | |
Replace BOOST_FOREACH with C++11 ranged for
Diffstat (limited to 'src/cryptonote_core/cryptonote_core.cpp')
| -rw-r--r-- | src/cryptonote_core/cryptonote_core.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index f33a4f253..c5450c50d 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -668,7 +668,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 +681,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 +703,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 +869,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); |
