mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 23:40:11 +02:00
fix order of ctors and assignment operators
This commit is contained in:
parent
023f3b8134
commit
5bed3502ef
2 changed files with 10 additions and 9 deletions
|
@ -101,14 +101,6 @@ NLPacket::NLPacket(const NLPacket& other) : Packet(other) {
|
||||||
_sourceID = other._sourceID;
|
_sourceID = other._sourceID;
|
||||||
}
|
}
|
||||||
|
|
||||||
NLPacket& NLPacket::operator=(const NLPacket& other) {
|
|
||||||
Packet::operator=(other);
|
|
||||||
|
|
||||||
_sourceID = other._sourceID;
|
|
||||||
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
NLPacket::NLPacket(std::unique_ptr<char> data, qint64 size, const HifiSockAddr& senderSockAddr) :
|
NLPacket::NLPacket(std::unique_ptr<char> data, qint64 size, const HifiSockAddr& senderSockAddr) :
|
||||||
Packet(std::move(data), size, senderSockAddr)
|
Packet(std::move(data), size, senderSockAddr)
|
||||||
{
|
{
|
||||||
|
@ -126,6 +118,14 @@ NLPacket::NLPacket(NLPacket&& other) :
|
||||||
_sourceID = std::move(other._sourceID);
|
_sourceID = std::move(other._sourceID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NLPacket& NLPacket::operator=(const NLPacket& other) {
|
||||||
|
Packet::operator=(other);
|
||||||
|
|
||||||
|
_sourceID = other._sourceID;
|
||||||
|
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
NLPacket& NLPacket::operator=(NLPacket&& other) {
|
NLPacket& NLPacket::operator=(NLPacket&& other) {
|
||||||
|
|
||||||
Packet::operator=(std::move(other));
|
Packet::operator=(std::move(other));
|
||||||
|
|
|
@ -51,8 +51,9 @@ protected:
|
||||||
NLPacket(std::unique_ptr<char> data, qint64 size, const HifiSockAddr& senderSockAddr);
|
NLPacket(std::unique_ptr<char> data, qint64 size, const HifiSockAddr& senderSockAddr);
|
||||||
NLPacket(std::unique_ptr<Packet> packet);
|
NLPacket(std::unique_ptr<Packet> packet);
|
||||||
NLPacket(const NLPacket& other);
|
NLPacket(const NLPacket& other);
|
||||||
NLPacket& operator=(const NLPacket& other);
|
|
||||||
NLPacket(NLPacket&& other);
|
NLPacket(NLPacket&& other);
|
||||||
|
|
||||||
|
NLPacket& operator=(const NLPacket& other);
|
||||||
NLPacket& operator=(NLPacket&& other);
|
NLPacket& operator=(NLPacket&& other);
|
||||||
|
|
||||||
void readSourceID();
|
void readSourceID();
|
||||||
|
|
Loading…
Reference in a new issue