From 01cc7a996babc9173a393bf3dae080dc14a277c9 Mon Sep 17 00:00:00 2001 From: qarmin Date: Wed, 10 Jul 2019 11:54:12 +0200 Subject: Use reference to constant in functions --- drivers/unix/net_socket_posix.cpp | 2 +- drivers/unix/net_socket_posix.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') 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(); -- cgit v1.2.3