diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-07-10 15:43:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-10 15:43:15 +0200 |
commit | 34d74840396853f561964c3f4f6e56ac63a57640 (patch) | |
tree | 7a60acf577ea05294f46242f6b934d6661cf75ee /drivers | |
parent | 8b778f62347e7aff48122aa3945f1373b3fae5d3 (diff) | |
parent | 01cc7a996babc9173a393bf3dae080dc14a277c9 (diff) |
Merge pull request #30455 from qarmin/const_reference
Pass by reference to const
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/unix/net_socket_posix.cpp | 2 | ||||
-rw-r--r-- | drivers/unix/net_socket_posix.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/unix/net_socket_posix.cpp b/drivers/unix/net_socket_posix.cpp index f8e771aea0..6a57a2e562 100644 --- a/drivers/unix/net_socket_posix.cpp +++ b/drivers/unix/net_socket_posix.cpp @@ -212,7 +212,7 @@ NetSocketPosix::NetError NetSocketPosix::_get_socket_error() { #pragma GCC diagnostic pop #endif -bool NetSocketPosix::_can_use_ip(const IP_Address p_ip, const bool p_for_bind) const { +bool NetSocketPosix::_can_use_ip(const IP_Address &p_ip, const bool p_for_bind) const { if (p_for_bind && !(p_ip.is_valid() || p_ip.is_wildcard())) { return false; diff --git a/drivers/unix/net_socket_posix.h b/drivers/unix/net_socket_posix.h index ce6dc00d42..40406b241a 100644 --- a/drivers/unix/net_socket_posix.h +++ b/drivers/unix/net_socket_posix.h @@ -65,7 +65,7 @@ private: protected: static NetSocket *_create_func(); - bool _can_use_ip(const IP_Address p_ip, const bool p_for_bind) const; + bool _can_use_ip(const IP_Address &p_ip, const bool p_for_bind) const; public: static void make_default(); |