Skip to content
Snippets Groups Projects
Commit 9080d6ed authored by Daniel Müller's avatar Daniel Müller :speech_balloon:
Browse files

Fix for real

parent ab2f71e2
No related branches found
No related tags found
No related merge requests found
Pipeline #72552 passed
...@@ -4,38 +4,38 @@ namespace netlib ...@@ -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); if (disableAutoclose) other.setAutoclose(false);
return SockCopy<TcpStream>(other); return SockCopy<TcpStream>(other);
} }
SockCopy<TcpListener> wrapCopy(TcpListener & other, bool disableAutoclose = true) SockCopy<TcpListener> wrapCopy(TcpListener & other, bool disableAutoclose)
{ {
if (disableAutoclose) other.setAutoclose(false); if (disableAutoclose) other.setAutoclose(false);
return SockCopy<TcpListener>(other); return SockCopy<TcpListener>(other);
} }
SockCopy<UdpSocket> wrapCopy(UdpSocket & other, bool disableAutoclose = true) SockCopy<UdpSocket> wrapCopy(UdpSocket & other, bool disableAutoclose)
{ {
if (disableAutoclose) other.setAutoclose(false); if (disableAutoclose) other.setAutoclose(false);
return SockCopy<UdpSocket>(other); return SockCopy<UdpSocket>(other);
} }
SockCopy<TcpStream> wrapCopy(TcpStream && other, bool disableAutoclose = true) SockCopy<TcpStream> wrapCopy(TcpStream && other, bool disableAutoclose)
{ {
if (disableAutoclose) other.setAutoclose(false); if (disableAutoclose) other.setAutoclose(false);
return SockCopy<TcpStream>(std::move(other)); 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); if (disableAutoclose) other.setAutoclose(false);
return SockCopy<TcpListener>(std::move(other)); 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); if (disableAutoclose) other.setAutoclose(false);
return SockCopy<UdpSocket>(std::move(other)); return SockCopy<UdpSocket>(std::move(other));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment