1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Replace NetworkPacket pointers to references

This commit is contained in:
Loic Blot 2015-03-13 22:01:49 +01:00
parent 74d34da6cb
commit 083c8c734e
8 changed files with 256 additions and 295 deletions

View file

@ -1725,9 +1725,8 @@ void ConnectionSendThread::connect(Address address)
// Send a dummy packet to server with peer_id = PEER_ID_INEXISTENT
m_connection->SetPeerID(PEER_ID_INEXISTENT);
NetworkPacket* pkt = new NetworkPacket(0,0);
m_connection->Send(PEER_ID_SERVER, 0, pkt, true);
delete pkt;
NetworkPacket pkt(0,0);
m_connection->Send(PEER_ID_SERVER, 0, &pkt, true);
}
void ConnectionSendThread::disconnect()