mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
Bring that Whole New World to the Old Continent too
Applies the clang-format style to the 2.1 branch as done for master in
5dbf1809c6.
This commit is contained in:
parent
1d418afe86
commit
f8db8a3faa
1308 changed files with 147754 additions and 174357 deletions
|
|
@ -28,7 +28,7 @@
|
|||
/*************************************************************************/
|
||||
#include "tcp_server.h"
|
||||
|
||||
TCP_Server* (*TCP_Server::_create)()=NULL;
|
||||
TCP_Server *(*TCP_Server::_create)() = NULL;
|
||||
|
||||
Ref<TCP_Server> TCP_Server::create_ref() {
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ Ref<TCP_Server> TCP_Server::create_ref() {
|
|||
return Ref<TCP_Server>(_create());
|
||||
}
|
||||
|
||||
TCP_Server* TCP_Server::create() {
|
||||
TCP_Server *TCP_Server::create() {
|
||||
|
||||
if (!_create)
|
||||
return NULL;
|
||||
|
|
@ -47,11 +47,10 @@ TCP_Server* TCP_Server::create() {
|
|||
Error TCP_Server::_listen(uint16_t p_port, DVector<String> p_accepted_hosts) {
|
||||
|
||||
List<String> hosts;
|
||||
for(int i=0;i<p_accepted_hosts.size();i++)
|
||||
for (int i = 0; i < p_accepted_hosts.size(); i++)
|
||||
hosts.push_back(p_accepted_hosts.get(i));
|
||||
|
||||
return listen(p_port, hosts.size()?&hosts:NULL);
|
||||
|
||||
return listen(p_port, hosts.size() ? &hosts : NULL);
|
||||
}
|
||||
|
||||
void TCP_Server::set_ip_type(IP::Type p_type) {
|
||||
|
|
@ -61,16 +60,13 @@ void TCP_Server::set_ip_type(IP::Type p_type) {
|
|||
|
||||
void TCP_Server::_bind_methods() {
|
||||
|
||||
ObjectTypeDB::bind_method(_MD("set_ip_type","ip_type"),&TCP_Server::set_ip_type);
|
||||
ObjectTypeDB::bind_method(_MD("listen","port","accepted_hosts"),&TCP_Server::_listen,DEFVAL(DVector<String>()));
|
||||
ObjectTypeDB::bind_method(_MD("is_connection_available"),&TCP_Server::is_connection_available);
|
||||
ObjectTypeDB::bind_method(_MD("take_connection"),&TCP_Server::take_connection);
|
||||
ObjectTypeDB::bind_method(_MD("stop"),&TCP_Server::stop);
|
||||
|
||||
ObjectTypeDB::bind_method(_MD("set_ip_type", "ip_type"), &TCP_Server::set_ip_type);
|
||||
ObjectTypeDB::bind_method(_MD("listen", "port", "accepted_hosts"), &TCP_Server::_listen, DEFVAL(DVector<String>()));
|
||||
ObjectTypeDB::bind_method(_MD("is_connection_available"), &TCP_Server::is_connection_available);
|
||||
ObjectTypeDB::bind_method(_MD("take_connection"), &TCP_Server::take_connection);
|
||||
ObjectTypeDB::bind_method(_MD("stop"), &TCP_Server::stop);
|
||||
}
|
||||
|
||||
|
||||
TCP_Server::TCP_Server()
|
||||
{
|
||||
TCP_Server::TCP_Server() {
|
||||
ip_type = IP::TYPE_ANY;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue