mirror of
https://git.citron-emu.org/Citron/Citron.git
synced 2025-02-23 17:18:47 +01:00
Remove redundant TranslateIPv4 function
Remove the TranslateIPv4 function that converts in_addr to IPv4Address, as it appears to be unused or redundant. The functionality might be handled elsewhere in the codebase or no longer needed.
This commit is contained in:
parent
6917530ba5
commit
0576d40bf0
1 changed files with 0 additions and 5 deletions
|
@ -558,11 +558,6 @@ std::optional<Network::IPv4Address> GetHostIPv4Address() {
|
|||
return Network::TranslateIPv4(interface->ip_address);
|
||||
}
|
||||
|
||||
Network::IPv4Address TranslateIPv4(const in_addr& addr) {
|
||||
const auto bytes = reinterpret_cast<const uint8_t*>(&addr.s_addr);
|
||||
return Network::IPv4Address{bytes[0], bytes[1], bytes[2], bytes[3]};
|
||||
}
|
||||
|
||||
u32 IPv4AddressToInteger(IPv4Address ip_addr) {
|
||||
return static_cast<u32>(ip_addr[0]) << 24 | static_cast<u32>(ip_addr[1]) << 16 |
|
||||
static_cast<u32>(ip_addr[2]) << 8 | static_cast<u32>(ip_addr[3]);
|
||||
|
|
Loading…
Reference in a new issue