You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
Style: Cleanup single-line blocks, semicolons, dead code
Remove currently unused implementation of TextureBasisU, could be re-added later on if needed and ported.
This commit is contained in:
@@ -147,7 +147,7 @@ void NetSocketPosix::_set_ip_port(struct sockaddr_storage *p_addr, IPAddress *r_
|
||||
if (r_port) {
|
||||
*r_port = ntohs(addr6->sin6_port);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
NetSocket *NetSocketPosix::_create_func() {
|
||||
@@ -325,8 +325,9 @@ Error NetSocketPosix::open(Type p_sock_type, IP::Type &ip_type) {
|
||||
|
||||
#if defined(__OpenBSD__)
|
||||
// OpenBSD does not support dual stacking, fallback to IPv4 only.
|
||||
if (ip_type == IP::TYPE_ANY)
|
||||
if (ip_type == IP::TYPE_ANY) {
|
||||
ip_type = IP::TYPE_IPV4;
|
||||
}
|
||||
#endif
|
||||
|
||||
int family = ip_type == IP::TYPE_IPV4 ? AF_INET : AF_INET6;
|
||||
@@ -420,7 +421,7 @@ Error NetSocketPosix::listen(int p_max_pending) {
|
||||
print_verbose("Failed to listen from socket.");
|
||||
close();
|
||||
return FAILED;
|
||||
};
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
@@ -494,8 +495,9 @@ Error NetSocketPosix::poll(PollType p_type, int p_timeout) const {
|
||||
return FAILED;
|
||||
}
|
||||
|
||||
if (ret == 0)
|
||||
if (ret == 0) {
|
||||
return ERR_BUSY;
|
||||
}
|
||||
|
||||
if (FD_ISSET(_sock, &ex)) {
|
||||
_get_socket_error();
|
||||
@@ -503,10 +505,12 @@ Error NetSocketPosix::poll(PollType p_type, int p_timeout) const {
|
||||
return FAILED;
|
||||
}
|
||||
|
||||
if (rdp && FD_ISSET(_sock, rdp))
|
||||
if (rdp && FD_ISSET(_sock, rdp)) {
|
||||
ready = true;
|
||||
if (wrp && FD_ISSET(_sock, wrp))
|
||||
}
|
||||
if (wrp && FD_ISSET(_sock, wrp)) {
|
||||
ready = true;
|
||||
}
|
||||
|
||||
return ready ? OK : ERR_BUSY;
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user