diff options
| author | 2021-08-13 01:28:14 +0200 | |
|---|---|---|
| committer | 2021-08-13 01:28:14 +0200 | |
| commit | a0c4c1a23adb3645e1d225644ab5e0e7aea513ad (patch) | |
| tree | d48353b735c91a5be927a7fc247672c9e802d30c /src/core | |
| parent | network: narrow down scope of "result" in win32 code for (diff) | |
| download | yuzu-a0c4c1a23adb3645e1d225644ab5e0e7aea513ad.tar.gz yuzu-a0c4c1a23adb3645e1d225644ab5e0e7aea513ad.tar.xz yuzu-a0c4c1a23adb3645e1d225644ab5e0e7aea513ad.zip | |
network: use Common::BitCast instead of std::bit_cast
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/network/network_interface.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/network/network_interface.cpp b/src/core/network/network_interface.cpp index 34e20f547..e9060f13f 100644 --- a/src/core/network/network_interface.cpp +++ b/src/core/network/network_interface.cpp | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | #include <vector> | 5 | #include <vector> |
| 6 | 6 | ||
| 7 | #include "common/bit_cast.h" | ||
| 7 | #include "common/common_types.h" | 8 | #include "common/common_types.h" |
| 8 | #include "common/logging/log.h" | 9 | #include "common/logging/log.h" |
| 9 | #include "common/string_util.h" | 10 | #include "common/string_util.h" |
| @@ -55,7 +56,7 @@ std::vector<NetworkInterface> GetAvailableNetworkInterfaces() { | |||
| 55 | continue; | 56 | continue; |
| 56 | } | 57 | } |
| 57 | 58 | ||
| 58 | const auto ip_addr = std::bit_cast<struct sockaddr_in>( | 59 | const auto ip_addr = Common::BitCast<struct sockaddr_in>( |
| 59 | *current_address->FirstUnicastAddress->Address.lpSockaddr) | 60 | *current_address->FirstUnicastAddress->Address.lpSockaddr) |
| 60 | .sin_addr; | 61 | .sin_addr; |
| 61 | 62 | ||
| @@ -99,7 +100,7 @@ std::vector<NetworkInterface> GetAvailableNetworkInterfaces() { | |||
| 99 | 100 | ||
| 100 | result.push_back(NetworkInterface{ | 101 | result.push_back(NetworkInterface{ |
| 101 | .name{ifa->ifa_name}, | 102 | .name{ifa->ifa_name}, |
| 102 | .ip_address{std::bit_cast<struct sockaddr_in>(*ifa->ifa_addr).sin_addr}}); | 103 | .ip_address{Common::BitCast<struct sockaddr_in>(*ifa->ifa_addr).sin_addr}}); |
| 103 | } | 104 | } |
| 104 | 105 | ||
| 105 | freeifaddrs(ifaddr); | 106 | freeifaddrs(ifaddr); |