Network/NetPacket: Add move constructor/operator

Former-commit-id: 56cb793ab75e5bcd97b89c5be3592922c23a7a4d
This commit is contained in:
Lynix
2016-02-24 14:17:47 +01:00
parent a851056c0a
commit d24de1f719
2 changed files with 30 additions and 2 deletions

View File

@@ -25,7 +25,7 @@ namespace Nz
inline NetPacket(UInt16 netCode, std::size_t minCapacity = 0);
inline NetPacket(UInt16 netCode, const void* ptr, std::size_t size);
NetPacket(const NetPacket&) = delete;
NetPacket(NetPacket&&) = default;
NetPacket(NetPacket&& packet);
inline ~NetPacket();
inline const UInt8* GetConstData() const;
@@ -45,7 +45,7 @@ namespace Nz
inline void SetNetCode(UInt16 netCode);
NetPacket& operator=(const NetPacket&) = delete;
NetPacket& operator=(NetPacket&&) = default;
NetPacket& operator=(NetPacket&& packet);
static bool DecodeHeader(const void* data, UInt16* packetSize, UInt16* netCode);
static bool EncodeHeader(void* data, UInt16 packetSize, UInt16 netCode);