mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-31 02:46:01 +02:00
scripted-diff: Fully remove BOOST_FOREACH
-BEGIN VERIFY SCRIPT- sed -i 's/BOOST_FOREACH *(\(.*\),/for (\1 :/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ; -END VERIFY SCRIPT-
This commit is contained in:
@@ -126,7 +126,7 @@ UniValue getpeerinfo(const JSONRPCRequest& request)
|
||||
|
||||
UniValue ret(UniValue::VARR);
|
||||
|
||||
BOOST_FOREACH(const CNodeStats& stats, vstats) {
|
||||
for (const CNodeStats& stats : vstats) {
|
||||
UniValue obj(UniValue::VOBJ);
|
||||
CNodeStateStats statestats;
|
||||
bool fStateStats = GetNodeStateStats(stats.nodeid, statestats);
|
||||
@@ -163,7 +163,7 @@ UniValue getpeerinfo(const JSONRPCRequest& request)
|
||||
obj.push_back(Pair("synced_headers", statestats.nSyncHeight));
|
||||
obj.push_back(Pair("synced_blocks", statestats.nCommonHeight));
|
||||
UniValue heights(UniValue::VARR);
|
||||
BOOST_FOREACH(int height, statestats.vHeightInFlight) {
|
||||
for (int height : statestats.vHeightInFlight) {
|
||||
heights.push_back(height);
|
||||
}
|
||||
obj.push_back(Pair("inflight", heights));
|
||||
@@ -171,14 +171,14 @@ UniValue getpeerinfo(const JSONRPCRequest& request)
|
||||
obj.push_back(Pair("whitelisted", stats.fWhitelisted));
|
||||
|
||||
UniValue sendPerMsgCmd(UniValue::VOBJ);
|
||||
BOOST_FOREACH(const mapMsgCmdSize::value_type &i, stats.mapSendBytesPerMsgCmd) {
|
||||
for (const mapMsgCmdSize::value_type &i : stats.mapSendBytesPerMsgCmd) {
|
||||
if (i.second > 0)
|
||||
sendPerMsgCmd.push_back(Pair(i.first, i.second));
|
||||
}
|
||||
obj.push_back(Pair("bytessent_per_msg", sendPerMsgCmd));
|
||||
|
||||
UniValue recvPerMsgCmd(UniValue::VOBJ);
|
||||
BOOST_FOREACH(const mapMsgCmdSize::value_type &i, stats.mapRecvBytesPerMsgCmd) {
|
||||
for (const mapMsgCmdSize::value_type &i : stats.mapRecvBytesPerMsgCmd) {
|
||||
if (i.second > 0)
|
||||
recvPerMsgCmd.push_back(Pair(i.first, i.second));
|
||||
}
|
||||
@@ -474,7 +474,7 @@ UniValue getnetworkinfo(const JSONRPCRequest& request)
|
||||
UniValue localAddresses(UniValue::VARR);
|
||||
{
|
||||
LOCK(cs_mapLocalHost);
|
||||
BOOST_FOREACH(const PAIRTYPE(CNetAddr, LocalServiceInfo) &item, mapLocalHost)
|
||||
for (const PAIRTYPE(CNetAddr, LocalServiceInfo) &item : mapLocalHost)
|
||||
{
|
||||
UniValue rec(UniValue::VOBJ);
|
||||
rec.push_back(Pair("address", item.first.ToString()));
|
||||
|
||||
Reference in New Issue
Block a user