refactor(src/common): remove unused imports (#19506)

* refactor(src/common): remove unused imports

* fix: build

* chore: fix build

* chore: size_t -> std::size_t

* chore: fix fuckup from previous commit

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build with std::size_t

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build
This commit is contained in:
Francesco Borzì
2024-07-31 01:06:46 +02:00
committed by GitHub
parent 06a608d244
commit 02a05fbd4c
200 changed files with 522 additions and 581 deletions

View File

@@ -22,7 +22,7 @@ WorldPackets::Packet::Packet(WorldPacket&& worldPacket) : _worldPacket(std::move
{
}
WorldPackets::ServerPacket::ServerPacket(OpcodeServer opcode, size_t initialSize /*= 200*/) : Packet(WorldPacket(opcode, initialSize))
WorldPackets::ServerPacket::ServerPacket(OpcodeServer opcode, std::size_t initialSize /*= 200*/) : Packet(WorldPacket(opcode, initialSize))
{
}

View File

@@ -36,7 +36,7 @@ namespace WorldPackets
virtual void Read() = 0;
[[nodiscard]] WorldPacket const* GetRawPacket() const { return &_worldPacket; }
[[nodiscard]] size_t GetSize() const { return _worldPacket.size(); }
[[nodiscard]] std::size_t GetSize() const { return _worldPacket.size(); }
protected:
WorldPacket _worldPacket;
@@ -45,7 +45,7 @@ namespace WorldPackets
class AC_GAME_API ServerPacket : public Packet
{
public:
ServerPacket(OpcodeServer opcode, size_t initialSize = 200);
ServerPacket(OpcodeServer opcode, std::size_t initialSize = 200);
void Read() final;

View File

@@ -29,7 +29,7 @@ public:
// just container for later use
WorldPacket() : ByteBuffer(0) { }
explicit WorldPacket(uint16 opcode, size_t res = 200) :
explicit WorldPacket(uint16 opcode, std::size_t res = 200) :
ByteBuffer(res), m_opcode(opcode) { }
WorldPacket(WorldPacket&& packet) noexcept :
@@ -66,7 +66,7 @@ public:
WorldPacket(uint16 opcode, MessageBuffer&& buffer) :
ByteBuffer(std::move(buffer)), m_opcode(opcode) { }
void Initialize(uint16 opcode, size_t newres = 200)
void Initialize(uint16 opcode, std::size_t newres = 200)
{
clear();
_storage.reserve(newres);

View File

@@ -46,13 +46,14 @@
#include "Tokenize.h"
#include "Transport.h"
#include "Vehicle.h"
#include "WardenMac.h"
#include "WardenWin.h"
#include "World.h"
#include "WorldPacket.h"
#include "WorldSocket.h"
#include <zlib.h>
#include "BanMgr.h"
namespace
{
std::string const DefaultPlayerName = "<none>";

View File

@@ -25,7 +25,6 @@
#include "AccountMgr.h"
#include "AddonMgr.h"
#include "AuthDefines.h"
#include "BanMgr.h"
#include "CircularBuffer.h"
#include "Common.h"
#include "DatabaseEnv.h"
@@ -34,6 +33,7 @@
#include "SharedDefines.h"
#include "World.h"
#include <map>
#include <memory>
#include <utility>
class Creature;