summaryrefslogtreecommitdiff
path: root/Source/Core/Common/ENet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/Common/ENet.cpp')
-rw-r--r--Source/Core/Common/ENet.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/Core/Common/ENet.cpp b/Source/Core/Common/ENet.cpp
index f99c4476c5..055b79851a 100644
--- a/Source/Core/Common/ENet.cpp
+++ b/Source/Core/Common/ENet.cpp
@@ -37,7 +37,7 @@ int ENET_CALLBACK InterceptCallback(ENetHost* host, ENetEvent* event)
return 0;
}
-bool SendPacket(ENetPeer* socket, const sf::Packet& packet, u8 channel_id)
+bool SendPacket(ENetPeer* socket, std::span<const u8> packet, u8 channel_id)
{
if (!socket)
{
@@ -45,11 +45,10 @@ bool SendPacket(ENetPeer* socket, const sf::Packet& packet, u8 channel_id)
return false;
}
- ENetPacket* epac =
- enet_packet_create(packet.getData(), packet.getDataSize(), ENET_PACKET_FLAG_RELIABLE);
+ ENetPacket* epac = enet_packet_create(packet.data(), packet.size(), ENET_PACKET_FLAG_RELIABLE);
if (!epac)
{
- ERROR_LOG_FMT(NETPLAY, "Failed to create ENetPacket ({} bytes).", packet.getDataSize());
+ ERROR_LOG_FMT(NETPLAY, "Failed to create ENetPacket ({} bytes).", packet.size());
return false;
}