replace piForeach* to for(:)

another c++11 try ...
This commit is contained in:
2020-07-30 20:08:33 +03:00
parent 2ffc457566
commit 557f2a4d0d
18 changed files with 151 additions and 235 deletions

View File

@@ -192,11 +192,10 @@ public:
addrs_tl->content << TileList::Row(a.address.toString() +
" | p = " + PIString::fromNumber(a.ping) +
" | a = " + PIString::fromBool(a.isAvailable()), CellFormat());
typedef PIPair<PIString, PIVector <PIPeer::PeerInfo* > > PeerPair;
PIStringList peermap;
piForeachC(PeerPair &p , daemon_._peerMap()) {
PIString s = p.first + " | ";
piForeachCR(PIPeer::PeerInfo * pp, p.second) s += " -> " + pp->name;
for (auto p = daemon_._peerMap().constBegin(); p != daemon_._peerMap().constEnd(); p++) {
PIString s = p.key() + " | ";
piForeachCR(PIPeer::PeerInfo * pp, p.value()) s += " -> " + pp->name;
peermap << s;
}
piForeachC(PIString &s , peermap)