// Copyright 2018 Dolphin Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once #include #include #include "Common/CommonTypes.h" #include "Common/Swap.h" sf::Packet& operator>>(sf::Packet& packet, Common::BigEndianValue& data); sf::Packet& operator>>(sf::Packet& packet, Common::BigEndianValue& data); sf::Packet& operator>>(sf::Packet& packet, Common::BigEndianValue& data); template >* = nullptr> sf::Packet& operator<<(sf::Packet& packet, Enum e) { using Underlying = std::underlying_type_t; packet << static_cast(e); return packet; } template >* = nullptr> sf::Packet& operator>>(sf::Packet& packet, Enum& e) { using Underlying = std::underlying_type_t; Underlying value{}; packet >> value; e = static_cast(value); return packet; } namespace Common { u64 PacketReadU64(sf::Packet& packet); } // namespace Common