diff options
| author | Tilka <tilkax@gmail.com> | 2024-05-04 08:24:59 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-04 08:24:59 +0100 |
| commit | c442c0d5e5dc993562b43871a7548d64bc82a1ad (patch) | |
| tree | f8d0e97e62b7212788ef1d121598e160fb163662 /Source/Core/Common/Network.cpp | |
| parent | c23562b7b5f43d27dab62ce6e3a25a2c3c35aed4 (diff) | |
| parent | fbbfea8e8e536800a6a911eb90cecdd1f343f9e3 (diff) | |
Merge pull request #10957 from Pokechu22/std-bitcast
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; |
