From fbbfea8e8e536800a6a911eb90cecdd1f343f9e3 Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Fri, 5 Aug 2022 21:10:17 -0700 Subject: Replace Common::BitCast with std::bit_cast --- Source/Core/Common/Network.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Source/Core/Common/Network.cpp') diff --git a/Source/Core/Common/Network.cpp b/Source/Core/Common/Network.cpp index f859a8d438..d8e60ccf1e 100644 --- a/Source/Core/Common/Network.cpp +++ b/Source/Core/Common/Network.cpp @@ -4,6 +4,7 @@ #include "Common/Network.h" #include +#include #include #include @@ -307,8 +308,8 @@ u16 ComputeNetworkChecksum(const void* data, u16 length, u32 initial_value) u16 ComputeTCPNetworkChecksum(const IPAddress& from, const IPAddress& to, const void* data, u16 length, u8 protocol) { - const u32 source_addr = ntohl(Common::BitCast(from)); - const u32 destination_addr = ntohl(Common::BitCast(to)); + const u32 source_addr = ntohl(std::bit_cast(from)); + const u32 destination_addr = ntohl(std::bit_cast(to)); const u32 initial_value = (source_addr >> 16) + (source_addr & 0xFFFF) + (destination_addr >> 16) + (destination_addr & 0xFFFF) + protocol + length; -- cgit v1.2.3