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

@@ -96,7 +96,7 @@ bool PIBinaryLog::openDevice() {
piForeachC(PIFile::FileInfo &i, es) {
if (i.extension() == "binlog" && i.isFile() && i.baseName().startsWith(filePrefix())) {
setPath(i.path);
piBreak;
break;
}
}
}

View File

@@ -491,7 +491,7 @@ bool PIPeer::dataRead(uchar * readed, int size) {
if (p.name != from) continue;
piForeach (PeerInfo::PeerAddress & a, p.addresses) {
if (a.address != addr) continue;
if (a.last_ping >= time) piBreak;
if (a.last_ping >= time) break;
ptime = ctime - time;
a.last_ping = time;
a.wait_ping = false;
@@ -677,7 +677,7 @@ bool PIPeer::mbcastRead(uchar * data, int size) {
if (peer.name == pi.name) peer.sync = 0;
ch = true;
}
piBreak;
break;
}
}
if (exist || isRemoved(rpeer)) continue;

View File

@@ -544,7 +544,7 @@ bool PISerial::openDevice() {
piForeachC (DeviceInfo & d, devs) {
if (d.id() == pl) {
p = d.path;
piBreak;
break;
}
}
if (p.isEmpty()) {