diff --git a/src/sockcopy.cpp b/src/sockcopy.cpp index 9c4b4b6bb011845aa8b1daa1c1d6455880d6b9b8..f08223dc0d89990299a0b008b9be1af59cd7c188 100644 --- a/src/sockcopy.cpp +++ b/src/sockcopy.cpp @@ -4,38 +4,38 @@ namespace netlib { -SockCopy<TcpStream> wrapCopy(TcpStream & other, bool disableAutoclose = true) +SockCopy<TcpStream> wrapCopy(TcpStream & other, bool disableAutoclose) { if (disableAutoclose) other.setAutoclose(false); return SockCopy<TcpStream>(other); } -SockCopy<TcpListener> wrapCopy(TcpListener & other, bool disableAutoclose = true) +SockCopy<TcpListener> wrapCopy(TcpListener & other, bool disableAutoclose) { if (disableAutoclose) other.setAutoclose(false); return SockCopy<TcpListener>(other); } -SockCopy<UdpSocket> wrapCopy(UdpSocket & other, bool disableAutoclose = true) +SockCopy<UdpSocket> wrapCopy(UdpSocket & other, bool disableAutoclose) { if (disableAutoclose) other.setAutoclose(false); return SockCopy<UdpSocket>(other); } -SockCopy<TcpStream> wrapCopy(TcpStream && other, bool disableAutoclose = true) +SockCopy<TcpStream> wrapCopy(TcpStream && other, bool disableAutoclose) { if (disableAutoclose) other.setAutoclose(false); return SockCopy<TcpStream>(std::move(other)); } -SockCopy<TcpListener> wrapCopy(TcpListener && other, bool disableAutoclose = true) +SockCopy<TcpListener> wrapCopy(TcpListener && other, bool disableAutoclose) { if (disableAutoclose) other.setAutoclose(false); return SockCopy<TcpListener>(std::move(other)); } -SockCopy<UdpSocket> wrapCopy(UdpSocket && other, bool disableAutoclose = true) +SockCopy<UdpSocket> wrapCopy(UdpSocket && other, bool disableAutoclose) { if (disableAutoclose) other.setAutoclose(false); return SockCopy<UdpSocket>(std::move(other));