You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-28 16:07:14 +00:00
Use C++ iterators for Lists in many situations
This commit is contained in:
@@ -269,11 +269,11 @@ _FORCE_INLINE_ Error NetSocketPosix::_change_multicast_group(IPAddress p_ip, Str
|
||||
break; // IPv6 uses index.
|
||||
}
|
||||
|
||||
for (List<IPAddress>::Element *F = c.ip_addresses.front(); F; F = F->next()) {
|
||||
if (!F->get().is_ipv4()) {
|
||||
for (IPAddress &F : c.ip_addresses) {
|
||||
if (!F.is_ipv4()) {
|
||||
continue; // Wrong IP type
|
||||
}
|
||||
if_ip = F->get();
|
||||
if_ip = F;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user