From 68d07cf7d3f68607fa1d46581dab1e378afa6338 Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Mon, 21 Oct 2019 20:03:27 +0200 Subject: [PATCH] Adjusted some things to the new shared library --- server/src/client/voice/VoiceClientConnection.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/client/voice/VoiceClientConnection.cpp b/server/src/client/voice/VoiceClientConnection.cpp index c93b20a..1fcbc6c 100644 --- a/server/src/client/voice/VoiceClientConnection.cpp +++ b/server/src/client/voice/VoiceClientConnection.cpp @@ -76,7 +76,7 @@ void VoiceClientConnection::handleDatagramReceived(const pipes::buffer_view& buf #endif #endif - auto packet = std::make_unique(buffer); + auto packet = ClientPacket::from_buffer(buffer); //packet //packet->type().type() @@ -427,7 +427,7 @@ unique_ptr VoiceClientConnection::next_reassembled_packe ); } - final_packet = make_unique(packet_buffer); + final_packet = ClientPacket::from_buffer(packet_buffer); final_packet->setCompressed(final_packet->has_flag(PacketFlag::Compressed)); } else { final_packet = buffer->pop_front(); @@ -455,7 +455,7 @@ void VoiceClientConnection::sendPacket(const shared_ptr& shared_ptr packet; if(copy) { - packet.reset(new protocol::ServerPacket(original_packet->buffer().dup(buffer::allocate_buffer(original_packet->buffer().length())))); + packet = protocol::ServerPacket::from_buffer(original_packet->buffer().dup(buffer::allocate_buffer(original_packet->buffer().length()))); if(original_packet->getListener()) packet->setListener(std::move(original_packet->getListener())); packet->memory_state.flags = original_packet->memory_state.flags;