mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-09 16:52:28 +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;
|
||||
}
|
||||
|
||||
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) :
|
||||
Packet(std::move(data), size, senderSockAddr)
|
||||
{
|
||||
|
@ -126,6 +118,14 @@ NLPacket::NLPacket(NLPacket&& other) :
|
|||
_sourceID = std::move(other._sourceID);
|
||||
}
|
||||
|
||||
NLPacket& NLPacket::operator=(const NLPacket& other) {
|
||||
Packet::operator=(other);
|
||||
|
||||
_sourceID = other._sourceID;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
NLPacket& NLPacket::operator=(NLPacket&& 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<Packet> packet);
|
||||
NLPacket(const NLPacket& other);
|
||||
NLPacket& operator=(const NLPacket& other);
|
||||
NLPacket(NLPacket&& other);
|
||||
|
||||
NLPacket& operator=(const NLPacket& other);
|
||||
NLPacket& operator=(NLPacket&& other);
|
||||
|
||||
void readSourceID();
|
||||
|
|
Loading…
Reference in a new issue