[General] Fix "using after move" warning

sol2-server-rewrite
Koncord 7 years ago
parent edd883853d
commit 6197636fac

@ -20,7 +20,8 @@ inline void AddPacket(mwmp::ActorPacketController::packets_t *packets, RakNet::R
{
T *packet = new T(peer);
typedef mwmp::ActorPacketController::packets_t::value_type value_t;
packets->insert(value_t(packet->GetPacketID(), value_t::second_type(std::move(packet))));
unsigned char packetId = packet->GetPacketID();
packets->insert(value_t(packetId, value_t::second_type(std::move(packet))));
}
mwmp::ActorPacketController::ActorPacketController(RakNet::RakPeerInterface *peer)

@ -47,7 +47,8 @@ inline void AddPacket(mwmp::PlayerPacketController::packets_t *packets, RakNet::
{
T *packet = new T(peer);
typedef mwmp::PlayerPacketController::packets_t::value_type value_t;
packets->insert(value_t(packet->GetPacketID(), value_t::second_type(std::move(packet))));
unsigned char packetId = packet->GetPacketID();
packets->insert(value_t(packetId, value_t::second_type(std::move(packet))));
}
mwmp::PlayerPacketController::PlayerPacketController(RakNet::RakPeerInterface *peer)

@ -27,7 +27,8 @@ inline void AddPacket(mwmp::WorldPacketController::packets_t *packets, RakNet::R
{
T *packet = new T(peer);
typedef mwmp::WorldPacketController::packets_t::value_type value_t;
packets->insert(value_t(packet->GetPacketID(), value_t::second_type(std::move(packet))));
unsigned char packetId = packet->GetPacketID();
packets->insert(value_t(packetId, value_t::second_type(std::move(packet))));
}
mwmp::WorldPacketController::WorldPacketController(RakNet::RakPeerInterface *peer)

Loading…
Cancel
Save