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/rpc/core_rpc_server.cpp | |
parent | Merge pull request #1608 (diff) | |
download | monero-629e3101ab54edfcadc42c6f3d7ea9c4fa3f9a93.tar.xz |
Replace BOOST_FOREACH with C++11 ranged for
Diffstat (limited to 'src/rpc/core_rpc_server.cpp')
-rw-r--r-- | src/rpc/core_rpc_server.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index 7d896e491..01d84f7ce 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -160,7 +160,7 @@ namespace cryptonote return false; } - BOOST_FOREACH(auto& b, bs) + for(auto& b: bs) { res.blocks.resize(res.blocks.size()+1); res.blocks.back().block = block_to_blob(b.first); @@ -173,7 +173,7 @@ namespace cryptonote return false; } size_t txidx = 0; - BOOST_FOREACH(auto& t, b.second) + for(auto& t: b.second) { res.blocks.back().txs.push_back(tx_to_blob(t)); res.output_indices.back().indices.push_back(COMMAND_RPC_GET_BLOCKS_FAST::tx_output_indices()); @@ -381,7 +381,7 @@ namespace cryptonote { CHECK_CORE_BUSY(); std::vector<crypto::hash> vh; - BOOST_FOREACH(const auto& tx_hex_str, req.txs_hashes) + for(const auto& tx_hex_str: req.txs_hashes) { blobdata b; if(!string_tools::parse_hexstr_to_binbuff(tx_hex_str, b)) @@ -433,7 +433,7 @@ namespace cryptonote std::list<std::string>::const_iterator txhi = req.txs_hashes.begin(); std::vector<crypto::hash>::const_iterator vhi = vh.begin(); - BOOST_FOREACH(auto& tx, txs) + for(auto& tx: txs) { res.txs.push_back(COMMAND_RPC_GET_TRANSACTIONS::entry()); COMMAND_RPC_GET_TRANSACTIONS::entry &e = res.txs.back(); @@ -471,7 +471,7 @@ namespace cryptonote } } - BOOST_FOREACH(const auto& miss_tx, missed_txs) + for(const auto& miss_tx: missed_txs) { res.missed_tx.push_back(string_tools::pod_to_hex(miss_tx)); } @@ -485,7 +485,7 @@ namespace cryptonote { CHECK_CORE_BUSY(); std::vector<crypto::key_image> key_images; - BOOST_FOREACH(const auto& ki_hex_str, req.key_images) + for(const auto& ki_hex_str: req.key_images) { blobdata b; if(!string_tools::parse_hexstr_to_binbuff(ki_hex_str, b)) @@ -908,7 +908,7 @@ namespace cryptonote uint64_t core_rpc_server::get_block_reward(const block& blk) { uint64_t reward = 0; - BOOST_FOREACH(const tx_out& out, blk.miner_tx.vout) + for(const tx_out& out: blk.miner_tx.vout) { reward += out.amount; } |