fix(Core): C++ 11 rule of 3 compiant constructors (#3023)

This commit is contained in:
mishaparem
2020-06-15 13:45:04 +03:00
committed by GitHub
parent ebec48e6fd
commit a12e58b105
7 changed files with 79 additions and 35 deletions

View File

@@ -22,6 +22,12 @@ class WorldPacket : public ByteBuffer
WorldPacket(const WorldPacket &packet) : ByteBuffer(packet), m_opcode(packet.m_opcode)
{
}
/* requried as of C++ 11 */
#if __cplusplus >= 201103L
WorldPacket(WorldPacket&&) = default;
WorldPacket& operator=(const WorldPacket&) = default;
WorldPacket& operator=(WorldPacket&&) = default;
#endif
void Initialize(uint16 opcode, size_t newres=200)
{
@@ -37,4 +43,3 @@ class WorldPacket : public ByteBuffer
uint16 m_opcode;
};
#endif