forked from mirror/openmw-tes3mp
[General] Fix "using after move" warning
This commit is contained in:
parent
edd883853d
commit
6197636fac
3 changed files with 6 additions and 3 deletions
|
@ -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…
Reference in a new issue