Codechange: Replace network related FOR_ALL with range-based for loops
This commit is contained in:
@@ -102,8 +102,7 @@ public:
|
||||
FD_ZERO(&write_fd);
|
||||
|
||||
|
||||
Tsocket *cs;
|
||||
FOR_ALL_ITEMS_FROM(Tsocket, idx, cs, 0) {
|
||||
for (Tsocket *cs : Tsocket::Iterate()) {
|
||||
FD_SET(cs->sock, &read_fd);
|
||||
FD_SET(cs->sock, &write_fd);
|
||||
}
|
||||
@@ -122,7 +121,7 @@ public:
|
||||
}
|
||||
|
||||
/* read stuff from clients */
|
||||
FOR_ALL_ITEMS_FROM(Tsocket, idx, cs, 0) {
|
||||
for (Tsocket *cs : Tsocket::Iterate()) {
|
||||
cs->writable = !!FD_ISSET(cs->sock, &write_fd);
|
||||
if (FD_ISSET(cs->sock, &read_fd)) {
|
||||
cs->ReceivePackets();
|
||||
|
Reference in New Issue
Block a user