mirror of
https://github.com/dlang/phobos.git
synced 2025-05-01 23:50:31 +03:00
Stop using read-modify-write operations on enums in std.socket
This commit is contained in:
parent
4496f58382
commit
fd8797a84d
1 changed files with 3 additions and 3 deletions
|
@ -1483,7 +1483,7 @@ class Socket
|
||||||
Select!(size_t.sizeof > 4, long, int)
|
Select!(size_t.sizeof > 4, long, int)
|
||||||
send(const(void)[] buf, SocketFlags flags)
|
send(const(void)[] buf, SocketFlags flags)
|
||||||
{
|
{
|
||||||
flags |= SocketFlags.NOSIGNAL;
|
flags = flags | SocketFlags.NOSIGNAL;
|
||||||
auto sent = .send(sock, buf.ptr, buf.length, cast(int)flags);
|
auto sent = .send(sock, buf.ptr, buf.length, cast(int)flags);
|
||||||
return sent;
|
return sent;
|
||||||
}
|
}
|
||||||
|
@ -1500,7 +1500,7 @@ class Socket
|
||||||
Select!(size_t.sizeof > 4, long, int)
|
Select!(size_t.sizeof > 4, long, int)
|
||||||
sendTo(const(void)[] buf, SocketFlags flags, Address to)
|
sendTo(const(void)[] buf, SocketFlags flags, Address to)
|
||||||
{
|
{
|
||||||
flags |= SocketFlags.NOSIGNAL;
|
flags = flags | SocketFlags.NOSIGNAL;
|
||||||
return .sendto(sock, buf.ptr, buf.length, cast(int)flags, to.name(), to.nameLen());
|
return .sendto(sock, buf.ptr, buf.length, cast(int)flags, to.name(), to.nameLen());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1515,7 +1515,7 @@ class Socket
|
||||||
/// ditto
|
/// ditto
|
||||||
Select!(size_t.sizeof > 4, long, int) sendTo(const(void)[] buf, SocketFlags flags)
|
Select!(size_t.sizeof > 4, long, int) sendTo(const(void)[] buf, SocketFlags flags)
|
||||||
{
|
{
|
||||||
flags |= SocketFlags.NOSIGNAL;
|
flags = flags | SocketFlags.NOSIGNAL;
|
||||||
return .sendto(sock, buf.ptr, buf.length, cast(int)flags, null, 0);
|
return .sendto(sock, buf.ptr, buf.length, cast(int)flags, null, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue