mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 11:45:36 +02:00
copy version in Packet move ctor/assignment
This commit is contained in:
parent
8363b0d522
commit
3fbda89f1d
2 changed files with 4 additions and 2 deletions
|
@ -77,8 +77,8 @@ void OctreePacketProcessor::processPacket(QSharedPointer<NLPacket> packet, Share
|
|||
const QUuid& senderUUID = packet->getSourceID();
|
||||
if (!versionDebugSuppressMap.contains(senderUUID, packetType)) {
|
||||
|
||||
qDebug() << "Packet version mismatch on" << packetType << "- Sender"
|
||||
<< senderUUID << "sent" << (int) packetType << "but"
|
||||
qDebug() << "OctreePacketProcessor - piggyback packet version mismatch on" << packetType << "- Sender"
|
||||
<< senderUUID << "sent" << (int) packet->getVersion() << "but"
|
||||
<< (int) versionForPacketType(packetType) << "expected.";
|
||||
|
||||
emit packetVersionMismatch();
|
||||
|
|
|
@ -104,6 +104,7 @@ Packet::Packet(const Packet& other) :
|
|||
|
||||
Packet& Packet::operator=(const Packet& other) {
|
||||
_type = other._type;
|
||||
_version = other._version;
|
||||
|
||||
_packetSize = other._packetSize;
|
||||
_packet = std::unique_ptr<char>(new char[_packetSize]);
|
||||
|
@ -129,6 +130,7 @@ Packet::Packet(Packet&& other) {
|
|||
|
||||
Packet& Packet::operator=(Packet&& other) {
|
||||
_type = other._type;
|
||||
_version = other._version;
|
||||
|
||||
_packetSize = other._packetSize;
|
||||
_packet = std::move(other._packet);
|
||||
|
|
Loading…
Reference in a new issue