Replace the '+' operator with String.prototype.concat()
This commit is contained in:
parent
0e9234dce6
commit
37b2d9f600
|
@ -323,11 +323,11 @@ while(true) {
|
||||||
lostMsgs += numMissed; 
|
lostMsgs += numMissed; 
|
||||||
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
||||||
for(i = 0; i < numMissed; i++) {
|
for(i = 0; i < numMissed; i++) {
|
||||||
packets = packets.substr(0, lastMsg + i + 1) + "_"; 
|
packets = packets.substr(0, lastMsg + i + 1).concat("_"); 
|
||||||
}
|
}
|
||||||
} 
|
} 
|
||||||
}
|
}
|
||||||
packets = packets.substr(0, num) + "*";
|
packets = packets.substr(0, num).concat("*");
|
||||||
log.log("" + hops + " " + packets + "\n");
|
log.log("" + hops + " " + packets + "\n");
|
||||||
lastMsg = num;
|
lastMsg = num;
|
||||||
}
|
}
|
||||||
|
|
|
@ -323,11 +323,11 @@ while(true) {
|
||||||
lostMsgs += numMissed; 
|
lostMsgs += numMissed; 
|
||||||
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
||||||
for(i = 0; i < numMissed; i++) {
|
for(i = 0; i < numMissed; i++) {
|
||||||
packets = packets.substr(0, lastMsg + i + 1) + "_"; 
|
packets = packets.substr(0, lastMsg + i + 1).concat("_"); 
|
||||||
}
|
}
|
||||||
} 
|
} 
|
||||||
}
|
}
|
||||||
packets = packets.substr(0, num) + "*";
|
packets = packets.substr(0, num).concat("*");
|
||||||
log.log("" + hops + " " + packets + "\n");
|
log.log("" + hops + " " + packets + "\n");
|
||||||
lastMsg = num;
|
lastMsg = num;
|
||||||
}
|
}
|
||||||
|
|
|
@ -272,11 +272,11 @@ while(true) {
|
||||||
lostMsgs += numMissed; 
|
lostMsgs += numMissed; 
|
||||||
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
||||||
for(i = 0; i < numMissed; i++) {
|
for(i = 0; i < numMissed; i++) {
|
||||||
packets = packets.substr(0, lastMsg + i + 1) + "_"; 
|
packets = packets.substr(0, lastMsg + i + 1).concat("_"); 
|
||||||
}
|
}
|
||||||
} 
|
} 
|
||||||
}
|
}
|
||||||
packets = packets.substr(0, num) + "*";
|
packets = packets.substr(0, num).concat("*");
|
||||||
log.log("" + hops + " " + packets + "\n");
|
log.log("" + hops + " " + packets + "\n");
|
||||||
lastMsg = num;
|
lastMsg = num;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7038,11 +7038,11 @@ while(true) {
|
||||||
lostMsgs += numMissed; 
|
lostMsgs += numMissed; 
|
||||||
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
||||||
for(i = 0; i < numMissed; i++) {
|
for(i = 0; i < numMissed; i++) {
|
||||||
packets = packets.substr(0, lastMsg + i + 1) + "_"; 
|
packets = packets.substr(0, lastMsg + i + 1).concat("_"); 
|
||||||
}
|
}
|
||||||
} 
|
} 
|
||||||
}
|
}
|
||||||
packets = packets.substr(0, num) + "*";
|
packets = packets.substr(0, num).concat("*");
|
||||||
log.log("" + hops + " " + packets + "\n");
|
log.log("" + hops + " " + packets + "\n");
|
||||||
lastMsg = num;
|
lastMsg = num;
|
||||||
}
|
}
|
||||||
|
|
|
@ -321,11 +321,11 @@ while(true) {
|
||||||
lostMsgs += numMissed; 
|
lostMsgs += numMissed; 
|
||||||
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
||||||
for(i = 0; i < numMissed; i++) {
|
for(i = 0; i < numMissed; i++) {
|
||||||
packets = packets.substr(0, lastMsg + i + 1) + "_"; 
|
packets = packets.substr(0, lastMsg + i + 1).concat("_"); 
|
||||||
}
|
}
|
||||||
} 
|
} 
|
||||||
}
|
}
|
||||||
packets = packets.substr(0, num) + "*";
|
packets = packets.substr(0, num).concat("*");
|
||||||
log.log("" + hops + " " + packets + "\n");
|
log.log("" + hops + " " + packets + "\n");
|
||||||
lastMsg = num;
|
lastMsg = num;
|
||||||
}
|
}
|
||||||
|
|
|
@ -327,11 +327,11 @@ while(true) {
|
||||||
lostMsgs += numMissed; 
|
lostMsgs += numMissed; 
|
||||||
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
||||||
for(i = 0; i < numMissed; i++) {
|
for(i = 0; i < numMissed; i++) {
|
||||||
packets = packets.substr(0, lastMsg + i + 1) + "_"; 
|
packets = packets.substr(0, lastMsg + i + 1).concat("_"); 
|
||||||
}
|
}
|
||||||
} 
|
} 
|
||||||
}
|
}
|
||||||
packets = packets.substr(0, num) + "*";
|
packets = packets.substr(0, num).concat("*");
|
||||||
log.log("" + hops + " " + packets + "\n");
|
log.log("" + hops + " " + packets + "\n");
|
||||||
lastMsg = num;
|
lastMsg = num;
|
||||||
}
|
}
|
||||||
|
|
|
@ -339,11 +339,11 @@ while(true) {
|
||||||
lostMsgs += numMissed; 
|
lostMsgs += numMissed; 
|
||||||
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
||||||
for(i = 0; i < numMissed; i++) {
|
for(i = 0; i < numMissed; i++) {
|
||||||
packets = packets.substr(0, lastMsg + i + 1) + "_"; 
|
packets = packets.substr(0, lastMsg + i + 1).concat("_"); 
|
||||||
}
|
}
|
||||||
} 
|
} 
|
||||||
}
|
}
|
||||||
packets = packets.substr(0, num) + "*";
|
packets = packets.substr(0, num).concat("*");
|
||||||
log.log("" + hops + " " + packets + "\n");
|
log.log("" + hops + " " + packets + "\n");
|
||||||
lastMsg = num;
|
lastMsg = num;
|
||||||
}
|
}
|
||||||
|
|
|
@ -339,11 +339,11 @@ while(true) {
|
||||||
lostMsgs += numMissed; 
|
lostMsgs += numMissed; 
|
||||||
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
||||||
for(i = 0; i < numMissed; i++) {
|
for(i = 0; i < numMissed; i++) {
|
||||||
packets = packets.substr(0, lastMsg + i + 1) + "_"; 
|
packets = packets.substr(0, lastMsg + i + 1).concat("_"); 
|
||||||
}
|
}
|
||||||
} 
|
} 
|
||||||
}
|
}
|
||||||
packets = packets.substr(0, num) + "*";
|
packets = packets.substr(0, num).concat("*");
|
||||||
log.log("" + hops + " " + packets + "\n");
|
log.log("" + hops + " " + packets + "\n");
|
||||||
lastMsg = num;
|
lastMsg = num;
|
||||||
}
|
}
|
||||||
|
|
|
@ -339,11 +339,11 @@ while(true) {
|
||||||
lostMsgs += numMissed; 
|
lostMsgs += numMissed; 
|
||||||
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
||||||
for(i = 0; i < numMissed; i++) {
|
for(i = 0; i < numMissed; i++) {
|
||||||
packets = packets.substr(0, lastMsg + i + 1) + "_"; 
|
packets = packets.substr(0, lastMsg + i + 1).concat("_"); 
|
||||||
}
|
}
|
||||||
} 
|
} 
|
||||||
}
|
}
|
||||||
packets = packets.substr(0, num) + "*";
|
packets = packets.substr(0, num).concat("*");
|
||||||
log.log("" + hops + " " + packets + "\n");
|
log.log("" + hops + " " + packets + "\n");
|
||||||
lastMsg = num;
|
lastMsg = num;
|
||||||
}
|
}
|
||||||
|
|
|
@ -339,11 +339,11 @@ while(true) {
|
||||||
lostMsgs += numMissed; 
|
lostMsgs += numMissed; 
|
||||||
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
||||||
for(i = 0; i < numMissed; i++) {
|
for(i = 0; i < numMissed; i++) {
|
||||||
packets = packets.substr(0, lastMsg + i + 1) + "_"; 
|
packets = packets.substr(0, lastMsg + i + 1).concat("_"); 
|
||||||
}
|
}
|
||||||
} 
|
} 
|
||||||
}
|
}
|
||||||
packets = packets.substr(0, num) + "*";
|
packets = packets.substr(0, num).concat("*");
|
||||||
log.log("" + hops + " " + packets + "\n");
|
log.log("" + hops + " " + packets + "\n");
|
||||||
lastMsg = num;
|
lastMsg = num;
|
||||||
}
|
}
|
||||||
|
|
|
@ -339,11 +339,11 @@ while(true) {
|
||||||
lostMsgs += numMissed; 
|
lostMsgs += numMissed; 
|
||||||
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
||||||
for(i = 0; i < numMissed; i++) {
|
for(i = 0; i < numMissed; i++) {
|
||||||
packets = packets.substr(0, lastMsg + i + 1) + "_"; 
|
packets = packets.substr(0, lastMsg + i + 1).concat("_"); 
|
||||||
}
|
}
|
||||||
} 
|
} 
|
||||||
}
|
}
|
||||||
packets = packets.substr(0, num) + "*";
|
packets = packets.substr(0, num).concat("*");
|
||||||
log.log("" + hops + " " + packets + "\n");
|
log.log("" + hops + " " + packets + "\n");
|
||||||
lastMsg = num;
|
lastMsg = num;
|
||||||
}
|
}
|
||||||
|
|
|
@ -339,11 +339,11 @@ while(true) {
|
||||||
lostMsgs += numMissed; 
|
lostMsgs += numMissed; 
|
||||||
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
||||||
for(i = 0; i < numMissed; i++) {
|
for(i = 0; i < numMissed; i++) {
|
||||||
packets = packets.substr(0, lastMsg + i + 1) + "_"; 
|
packets = packets.substr(0, lastMsg + i + 1).concat("_"); 
|
||||||
}
|
}
|
||||||
} 
|
} 
|
||||||
}
|
}
|
||||||
packets = packets.substr(0, num) + "*";
|
packets = packets.substr(0, num).concat("*");
|
||||||
log.log("" + hops + " " + packets + "\n");
|
log.log("" + hops + " " + packets + "\n");
|
||||||
lastMsg = num;
|
lastMsg = num;
|
||||||
}
|
}
|
||||||
|
|
|
@ -234,12 +234,12 @@ while(true) {
|
||||||
lostMsgs += numMissed; 
|
lostMsgs += numMissed; 
|
||||||
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
||||||
for(i = 0; i < numMissed; i++) {
|
for(i = 0; i < numMissed; i++) {
|
||||||
packets = packets.substr(0, lastMsg + i + 1) + "_"; 
|
packets = packets.substr(0, lastMsg + i + 1).concat("_"); 
|
||||||
}
|
}
|
||||||
} 
|
} 
|
||||||
}
|
}
|
||||||
lastMsgHops = hops;
|
lastMsgHops = hops;
|
||||||
packets = packets.substr(0, num) + "*";
|
packets = packets.substr(0, num).concat("*");
|
||||||
log.log("" + hops + " " + packets + "\n");
|
log.log("" + hops + " " + packets + "\n");
|
||||||
lastMsg = num;
|
lastMsg = num;
|
||||||
}
|
}
|
||||||
|
|
|
@ -368,11 +368,11 @@ while(true) {
|
||||||
lostMsgs += numMissed; 
|
lostMsgs += numMissed; 
|
||||||
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
||||||
for(i = 0; i < numMissed; i++) {
|
for(i = 0; i < numMissed; i++) {
|
||||||
packets = packets.substr(0, lastMsg + i + 1) + "_"; 
|
packets = packets.substr(0, lastMsg + i + 1).concat("_"); 
|
||||||
}
|
}
|
||||||
} 
|
} 
|
||||||
}
|
}
|
||||||
packets = packets.substr(0, num) + "*";
|
packets = packets.substr(0, num).concat("*");
|
||||||
log.log("" + hops + " " + packets + "\n");
|
log.log("" + hops + " " + packets + "\n");
|
||||||
lastMsg = num;
|
lastMsg = num;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue