Use enumerateObjectsUsingBlock: where appropriate
FossilOrigin-Name: fd4460c7b65410b1f78e2f0df253cb5dd3cb73cff37ac75a012f8cbee1cadddd
This commit is contained in:
parent
12bf5923b0
commit
4bdb80410d
5 changed files with 29 additions and 37 deletions
|
@ -274,10 +274,10 @@ refreshservers()
|
|||
if (lastmillis - lastinfo >= 5000)
|
||||
pingservers();
|
||||
[servers sort];
|
||||
int maxmenu = 16;
|
||||
|
||||
size_t i = 0;
|
||||
for (ServerInfo *si in servers) {
|
||||
__block int maxmenu = 16;
|
||||
[servers enumerateObjectsUsingBlock:^(
|
||||
ServerInfo *si, size_t i, bool *stop) {
|
||||
if (si.address.host != ENET_HOST_ANY && si.ping != 9999) {
|
||||
if (si.protocol != PROTOCOL_VERSION)
|
||||
si.full = [[OFString alloc]
|
||||
|
@ -306,9 +306,7 @@ refreshservers()
|
|||
|
||||
if (!--maxmenu)
|
||||
return;
|
||||
|
||||
i++;
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue