2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

network: use Common::BitCast instead of std::bit_cast

This commit is contained in:
Sönke Holz 2021-08-13 01:28:14 +02:00
parent 8513e59431
commit a0c4c1a23a

View file

@ -4,6 +4,7 @@
#include <vector>
#include "common/bit_cast.h"
#include "common/common_types.h"
#include "common/logging/log.h"
#include "common/string_util.h"
@ -55,7 +56,7 @@ std::vector<NetworkInterface> GetAvailableNetworkInterfaces() {
continue;
}
const auto ip_addr = std::bit_cast<struct sockaddr_in>(
const auto ip_addr = Common::BitCast<struct sockaddr_in>(
*current_address->FirstUnicastAddress->Address.lpSockaddr)
.sin_addr;
@ -99,7 +100,7 @@ std::vector<NetworkInterface> GetAvailableNetworkInterfaces() {
result.push_back(NetworkInterface{
.name{ifa->ifa_name},
.ip_address{std::bit_cast<struct sockaddr_in>(*ifa->ifa_addr).sin_addr}});
.ip_address{Common::BitCast<struct sockaddr_in>(*ifa->ifa_addr).sin_addr}});
}
freeifaddrs(ifaddr);