summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/sockets
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-09-07 06:53:08 +0200
committerLioncash <mathew1800@gmail.com>2020-09-07 06:53:10 +0200
commit180fa6859fcb0a4e1ef1b24d6bcbf051b6c0b286 (patch)
tree19c56062b038136cca21bb57ca02a768f0c63521 /src/core/hle/service/sockets
parentblocking_worker: Make use of templated lambda (diff)
downloadyuzu-180fa6859fcb0a4e1ef1b24d6bcbf051b6c0b286.tar
yuzu-180fa6859fcb0a4e1ef1b24d6bcbf051b6c0b286.tar.gz
yuzu-180fa6859fcb0a4e1ef1b24d6bcbf051b6c0b286.tar.bz2
yuzu-180fa6859fcb0a4e1ef1b24d6bcbf051b6c0b286.tar.lz
yuzu-180fa6859fcb0a4e1ef1b24d6bcbf051b6c0b286.tar.xz
yuzu-180fa6859fcb0a4e1ef1b24d6bcbf051b6c0b286.tar.zst
yuzu-180fa6859fcb0a4e1ef1b24d6bcbf051b6c0b286.zip
Diffstat (limited to 'src/core/hle/service/sockets')
-rw-r--r--src/core/hle/service/sockets/sockets_translate.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/core/hle/service/sockets/sockets_translate.cpp b/src/core/hle/service/sockets/sockets_translate.cpp
index 2be8f642d..139743e1d 100644
--- a/src/core/hle/service/sockets/sockets_translate.cpp
+++ b/src/core/hle/service/sockets/sockets_translate.cpp
@@ -131,21 +131,21 @@ u16 TranslatePollEventsToGuest(u16 flags) {
Network::SockAddrIn Translate(SockAddrIn value) {
ASSERT(value.len == 0 || value.len == sizeof(value));
- Network::SockAddrIn result;
- result.family = Translate(static_cast<Domain>(value.family));
- result.ip = value.ip;
- result.portno = value.portno >> 8 | value.portno << 8;
- return result;
+ return {
+ .family = Translate(static_cast<Domain>(value.family)),
+ .ip = value.ip,
+ .portno = static_cast<u16>(value.portno >> 8 | value.portno << 8),
+ };
}
SockAddrIn Translate(Network::SockAddrIn value) {
- SockAddrIn result;
- result.len = sizeof(result);
- result.family = static_cast<u8>(Translate(value.family));
- result.portno = value.portno >> 8 | value.portno << 8;
- result.ip = value.ip;
- result.zeroes = {};
- return result;
+ return {
+ .len = sizeof(SockAddrIn),
+ .family = static_cast<u8>(Translate(value.family)),
+ .portno = static_cast<u16>(value.portno >> 8 | value.portno << 8),
+ .ip = value.ip,
+ .zeroes = {},
+ };
}
Network::ShutdownHow Translate(ShutdownHow how) {