mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-19 03:45:43 +00:00
refactor(Core): apply clang-tidy modernize-redundant-void-arg (#3825)
This commit is contained in:
@@ -118,7 +118,7 @@ typedef struct AuthHandler
|
||||
{
|
||||
eAuthCmd cmd;
|
||||
uint32 status;
|
||||
bool (AuthSocket::*handler)(void);
|
||||
bool (AuthSocket::*handler)();
|
||||
} AuthHandler;
|
||||
|
||||
// GCC have alternative #pragma pack() syntax and old gcc version not support pack(pop), also any gcc version not support it at some paltform
|
||||
@@ -188,15 +188,15 @@ AuthSocket::AuthSocket(RealmSocket& socket) :
|
||||
}
|
||||
|
||||
// Close patch file descriptor before leaving
|
||||
AuthSocket::~AuthSocket(void) { }
|
||||
AuthSocket::~AuthSocket() { }
|
||||
|
||||
// Accept the connection
|
||||
void AuthSocket::OnAccept(void)
|
||||
void AuthSocket::OnAccept()
|
||||
{
|
||||
sLog->outBasic("'%s:%d' Accepting connection", socket().getRemoteAddress().c_str(), socket().getRemotePort());
|
||||
}
|
||||
|
||||
void AuthSocket::OnClose(void)
|
||||
void AuthSocket::OnClose()
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "AuthSocket::OnClose");
|
||||
|
||||
@@ -31,11 +31,11 @@ public:
|
||||
const static int s_BYTE_SIZE = 32;
|
||||
|
||||
AuthSocket(RealmSocket& socket);
|
||||
~AuthSocket(void) override;
|
||||
~AuthSocket() override;
|
||||
|
||||
void OnRead(void) override;
|
||||
void OnAccept(void) override;
|
||||
void OnClose(void) override;
|
||||
void OnRead() override;
|
||||
void OnAccept() override;
|
||||
void OnClose() override;
|
||||
|
||||
static ACE_INET_Addr const& GetAddressForClient(Realm const& realm, ACE_INET_Addr const& clientAddr);
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
|
||||
private:
|
||||
RealmSocket& socket_;
|
||||
RealmSocket& socket(void) { return socket_; }
|
||||
RealmSocket& socket() { return socket_; }
|
||||
|
||||
BigNumber N, s, g, v;
|
||||
BigNumber b, B;
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
class RealmAcceptor : public ACE_Acceptor<RealmSocket, ACE_SOCK_Acceptor>
|
||||
{
|
||||
public:
|
||||
RealmAcceptor(void) { }
|
||||
virtual ~RealmAcceptor(void)
|
||||
RealmAcceptor() { }
|
||||
virtual ~RealmAcceptor()
|
||||
{
|
||||
if (reactor())
|
||||
reactor()->cancel_timer(this, 1);
|
||||
@@ -41,7 +41,7 @@ protected:
|
||||
return reactor()->register_handler(this, ACE_Event_Handler::ACCEPT_MASK);
|
||||
}
|
||||
|
||||
virtual int handle_accept_error(void)
|
||||
virtual int handle_accept_error()
|
||||
{
|
||||
#if defined(ENFILE) && defined(EMFILE)
|
||||
if (errno == ENFILE || errno == EMFILE)
|
||||
|
||||
@@ -2127,7 +2127,7 @@ public:
|
||||
m_DelayedOperations |= operation;
|
||||
}
|
||||
|
||||
void CheckAreaExploreAndOutdoor(void);
|
||||
void CheckAreaExploreAndOutdoor();
|
||||
|
||||
static TeamId TeamIdForRace(uint8 race);
|
||||
[[nodiscard]] TeamId GetTeamId(bool original = false) const { return original ? TeamIdForRace(getRace(true)) : m_team; };
|
||||
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
return i_cells[x][y];
|
||||
}
|
||||
|
||||
[[nodiscard]] uint32 GetGridId(void) const { return i_gridId; }
|
||||
[[nodiscard]] uint32 GetGridId() const { return i_gridId; }
|
||||
[[nodiscard]] int32 getX() const { return i_x; }
|
||||
[[nodiscard]] int32 getY() const { return i_y; }
|
||||
|
||||
|
||||
@@ -336,7 +336,7 @@ public:
|
||||
bool UnloadGrid(NGridType& ngrid);
|
||||
virtual void UnloadAll();
|
||||
|
||||
[[nodiscard]] uint32 GetId(void) const { return i_mapEntry->MapID; }
|
||||
[[nodiscard]] uint32 GetId() const { return i_mapEntry->MapID; }
|
||||
|
||||
static bool ExistMap(uint32 mapid, int gx, int gy);
|
||||
static bool ExistVMap(uint32 mapid, int gx, int gy);
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
#include "RealmSocket.h"
|
||||
#include "Log.h"
|
||||
|
||||
RealmSocket::Session::Session(void) { }
|
||||
RealmSocket::Session::Session() { }
|
||||
|
||||
RealmSocket::Session::~Session(void) { }
|
||||
RealmSocket::Session::~Session() { }
|
||||
|
||||
RealmSocket::RealmSocket(void) :
|
||||
RealmSocket::RealmSocket() :
|
||||
input_buffer_(4096), session_(nullptr),
|
||||
_remoteAddress(), _remotePort(0)
|
||||
{
|
||||
@@ -25,7 +25,7 @@ RealmSocket::RealmSocket(void) :
|
||||
msg_queue()->low_water_mark(8 * 1024 * 1024);
|
||||
}
|
||||
|
||||
RealmSocket::~RealmSocket(void)
|
||||
RealmSocket::~RealmSocket()
|
||||
{
|
||||
if (msg_queue())
|
||||
msg_queue()->close();
|
||||
@@ -75,17 +75,17 @@ int RealmSocket::close(u_long)
|
||||
return 0;
|
||||
}
|
||||
|
||||
const std::string& RealmSocket::getRemoteAddress(void) const
|
||||
const std::string& RealmSocket::getRemoteAddress() const
|
||||
{
|
||||
return _remoteAddress;
|
||||
}
|
||||
|
||||
uint16 RealmSocket::getRemotePort(void) const
|
||||
uint16 RealmSocket::getRemotePort() const
|
||||
{
|
||||
return _remotePort;
|
||||
}
|
||||
|
||||
size_t RealmSocket::recv_len(void) const
|
||||
size_t RealmSocket::recv_len() const
|
||||
{
|
||||
return input_buffer_.length();
|
||||
}
|
||||
|
||||
@@ -22,27 +22,27 @@ public:
|
||||
class Session
|
||||
{
|
||||
public:
|
||||
Session(void);
|
||||
virtual ~Session(void);
|
||||
Session();
|
||||
virtual ~Session();
|
||||
|
||||
virtual void OnRead(void) = 0;
|
||||
virtual void OnAccept(void) = 0;
|
||||
virtual void OnClose(void) = 0;
|
||||
virtual void OnRead() = 0;
|
||||
virtual void OnAccept() = 0;
|
||||
virtual void OnClose() = 0;
|
||||
};
|
||||
|
||||
RealmSocket(void);
|
||||
~RealmSocket(void) override;
|
||||
RealmSocket();
|
||||
~RealmSocket() override;
|
||||
|
||||
[[nodiscard]] size_t recv_len(void) const;
|
||||
[[nodiscard]] size_t recv_len() const;
|
||||
bool recv_soft(char* buf, size_t len);
|
||||
bool recv(char* buf, size_t len);
|
||||
void recv_skip(size_t len);
|
||||
|
||||
bool send(const char* buf, size_t len);
|
||||
|
||||
[[nodiscard]] const std::string& getRemoteAddress(void) const;
|
||||
[[nodiscard]] const std::string& getRemoteAddress() const;
|
||||
|
||||
[[nodiscard]] uint16 getRemotePort(void) const;
|
||||
[[nodiscard]] uint16 getRemotePort() const;
|
||||
|
||||
int open(void*) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user