refactor(Core): apply clang-tidy modernize-use-default-member-init (#3827)

This commit is contained in:
Francesco Borzì
2020-12-07 20:34:06 +01:00
committed by GitHub
parent 1cf39b3d22
commit c5a35efd7b
47 changed files with 352 additions and 366 deletions

View File

@@ -53,7 +53,7 @@ public:
const static size_t DEFAULT_SIZE = 0x1000;
// constructor
ByteBuffer() : _rpos(0), _wpos(0)
ByteBuffer()
{
_storage.reserve(DEFAULT_SIZE);
}
@@ -503,7 +503,7 @@ public:
void hexlike(bool outString = false) const;
protected:
size_t _rpos, _wpos;
size_t _rpos{0}, _wpos{0};
std::vector<uint8> _storage;
};

View File

@@ -14,7 +14,7 @@ class WorldPacket : public ByteBuffer
{
public:
// just container for later use
WorldPacket() : ByteBuffer(0), m_opcode(0)
WorldPacket() : ByteBuffer(0)
{
}
explicit WorldPacket(uint16 opcode, size_t res = 200) : ByteBuffer(res), m_opcode(opcode) { }
@@ -40,6 +40,6 @@ public:
void SetOpcode(uint16 opcode) { m_opcode = opcode; }
protected:
uint16 m_opcode;
uint16 m_opcode{0};
};
#endif