mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-26 22:38:34 +00:00
SFMLHelper: Simplify 64-bit packet reading function and remove 64-bit write function
Now that SFML's packet class can properly handle 64-bit values, we don't need a helper function just to write values to the packets.
This commit is contained in:
parent
3130d388db
commit
d10a0b440f
4 changed files with 15 additions and 20 deletions
|
@ -26,13 +26,8 @@ u32 PacketReadU32(sf::Packet& packet)
|
|||
|
||||
u64 PacketReadU64(sf::Packet& packet)
|
||||
{
|
||||
u32 low, high;
|
||||
packet >> low >> high;
|
||||
return low | (static_cast<u64>(high) << 32);
|
||||
}
|
||||
|
||||
void PacketWriteU64(sf::Packet& packet, const u64 value)
|
||||
{
|
||||
packet << static_cast<u32>(value) << static_cast<u32>(value >> 32);
|
||||
sf::Uint64 value;
|
||||
packet >> value;
|
||||
return value;
|
||||
}
|
||||
} // namespace Common
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue