diff options
| author | Pokechu22 <Pokechu022@gmail.com> | 2022-08-05 21:10:17 -0700 |
|---|---|---|
| committer | Pokechu22 <Pokechu022@gmail.com> | 2024-05-03 18:43:51 -0700 |
| commit | fbbfea8e8e536800a6a911eb90cecdd1f343f9e3 (patch) | |
| tree | e591d19127ac8cea60acf1108a6273dba6111558 /Source/Core/Common/Network.cpp | |
| parent | 57c890d4fcec1b86d71a8a5ad9c51c548a7bd9cd (diff) | |
Replace Common::BitCast with std::bit_cast
Diffstat (limited to 'Source/Core/Common/Network.cpp')
| -rw-r--r-- | Source/Core/Common/Network.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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 <algorithm> +#include <bit> #include <string_view> #include <vector> @@ -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<u32>(from)); - const u32 destination_addr = ntohl(Common::BitCast<u32>(to)); + const u32 source_addr = ntohl(std::bit_cast<u32>(from)); + const u32 destination_addr = ntohl(std::bit_cast<u32>(to)); const u32 initial_value = (source_addr >> 16) + (source_addr & 0xFFFF) + (destination_addr >> 16) + (destination_addr & 0xFFFF) + protocol + length; |
