// Copyright 2018 Dolphin Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once #include #include "Common/CommonTypes.h" #include "Common/EnumUtils.h" #include "Common/Swap.h" #include "Common/TypeUtils.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 sf::Packet& operator<<(sf::Packet& packet, Enum e) { packet << Common::ToUnderlying(e); return packet; } template 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