diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-08-16 16:41:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-16 16:41:35 +0200 |
commit | a8207b2dc7bebafd266f95371cc9707425110eba (patch) | |
tree | 79f52c0f21e8b1300165361c86055cc359f6b0e4 /core/io | |
parent | 970cbb460899ec68df7596f06b64bb5be81cea1c (diff) | |
parent | 21d281c4a953404c8f13e1cb7ee8d4cf9c25bb4c (diff) |
Merge pull request #10264 from Rubonnek/use-const-reference
Use const reference where favorable
Diffstat (limited to 'core/io')
-rw-r--r-- | core/io/packet_peer_udp.h | 2 | ||||
-rw-r--r-- | core/io/tcp_server.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/core/io/packet_peer_udp.h b/core/io/packet_peer_udp.h index a39eb6bcfd..007b810b67 100644 --- a/core/io/packet_peer_udp.h +++ b/core/io/packet_peer_udp.h @@ -49,7 +49,7 @@ protected: public: void set_blocking_mode(bool p_enable); - virtual Error listen(int p_port, IP_Address p_bind_address = IP_Address("*"), int p_recv_buffer_size = 65536) = 0; + virtual Error listen(int p_port, const IP_Address &p_bind_address = IP_Address("*"), int p_recv_buffer_size = 65536) = 0; virtual void close() = 0; virtual Error wait() = 0; virtual bool is_listening() const = 0; diff --git a/core/io/tcp_server.h b/core/io/tcp_server.h index 4e7fa7cf3e..b4ff3246ad 100644 --- a/core/io/tcp_server.h +++ b/core/io/tcp_server.h @@ -45,7 +45,7 @@ protected: static void _bind_methods(); public: - virtual Error listen(uint16_t p_port, const IP_Address p_bind_address = IP_Address("*")) = 0; + virtual Error listen(uint16_t p_port, const IP_Address &p_bind_address = IP_Address("*")) = 0; virtual bool is_connection_available() const = 0; virtual Ref<StreamPeerTCP> take_connection() = 0; |