mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Improve SFMLHelper
Switch to using additional overloads of sf::Packet, so we can eliminate some of the messy code and just use the normal syntax for BigEndianValue. We can't avoid helper functions with u64 due to SFML's non-standard way of defining 64-bit integer types.
This commit is contained in:
@ -5,15 +5,18 @@
|
||||
#pragma once
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Swap.h"
|
||||
|
||||
namespace sf
|
||||
{
|
||||
class Packet;
|
||||
}
|
||||
|
||||
sf::Packet& operator>>(sf::Packet& packet, Common::BigEndianValue<u16>& data);
|
||||
sf::Packet& operator>>(sf::Packet& packet, Common::BigEndianValue<u32>& data);
|
||||
sf::Packet& operator>>(sf::Packet& packet, Common::BigEndianValue<u64>& data);
|
||||
|
||||
namespace Common
|
||||
{
|
||||
u16 PacketReadU16(sf::Packet& packet);
|
||||
u32 PacketReadU32(sf::Packet& packet);
|
||||
u64 PacketReadU64(sf::Packet& packet);
|
||||
} // namespace Common
|
||||
|
Reference in New Issue
Block a user