refactor(Core): apply clang-tidy modernize-redundant-void-arg (#3825)
This commit is contained in:
@@ -39,7 +39,7 @@ namespace VMAP
|
|||||||
public:
|
public:
|
||||||
IVMapManager() : iEnableLineOfSightCalc(true), iEnableHeightCalc(true) { }
|
IVMapManager() : iEnableLineOfSightCalc(true), iEnableHeightCalc(true) { }
|
||||||
|
|
||||||
virtual ~IVMapManager(void) { }
|
virtual ~IVMapManager() { }
|
||||||
|
|
||||||
virtual int loadMap(const char* pBasePath, unsigned int pMapId, int x, int y) = 0;
|
virtual int loadMap(const char* pBasePath, unsigned int pMapId, int x, int y) = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ namespace VMAP
|
|||||||
static std::string getMapFileName(unsigned int mapId);
|
static std::string getMapFileName(unsigned int mapId);
|
||||||
|
|
||||||
VMapManager2();
|
VMapManager2();
|
||||||
~VMapManager2(void) override;
|
~VMapManager2() override;
|
||||||
|
|
||||||
int loadMap(const char* pBasePath, unsigned int mapId, int x, int y) override;
|
int loadMap(const char* pBasePath, unsigned int mapId, int x, int y) override;
|
||||||
|
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ public:
|
|||||||
BigNumber ModExp(BigNumber const& bn1, BigNumber const& bn2);
|
BigNumber ModExp(BigNumber const& bn1, BigNumber const& bn2);
|
||||||
BigNumber Exp(BigNumber const&);
|
BigNumber Exp(BigNumber const&);
|
||||||
|
|
||||||
int32 GetNumBytes(void);
|
int32 GetNumBytes();
|
||||||
|
|
||||||
struct bignum_st* BN() { return _bn; }
|
struct bignum_st* BN() { return _bn; }
|
||||||
|
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ public:
|
|||||||
void Initialize();
|
void Initialize();
|
||||||
void Finalize();
|
void Finalize();
|
||||||
|
|
||||||
uint8* GetDigest(void) { return mDigest; };
|
uint8* GetDigest() { return mDigest; };
|
||||||
[[nodiscard]] int GetLength(void) const { return SHA_DIGEST_LENGTH; };
|
[[nodiscard]] int GetLength() const { return SHA_DIGEST_LENGTH; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SHA_CTX mC;
|
SHA_CTX mC;
|
||||||
|
|||||||
@@ -102,8 +102,8 @@ public:
|
|||||||
// return (t != NULL);
|
// return (t != NULL);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
ContainerMapList<OBJECT_TYPES>& GetElements(void) { return i_elements; }
|
ContainerMapList<OBJECT_TYPES>& GetElements() { return i_elements; }
|
||||||
[[nodiscard]] const ContainerMapList<OBJECT_TYPES>& GetElements(void) const { return i_elements;}
|
[[nodiscard]] const ContainerMapList<OBJECT_TYPES>& GetElements() const { return i_elements;}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ContainerMapList<OBJECT_TYPES> i_elements;
|
ContainerMapList<OBJECT_TYPES> i_elements;
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ typedef struct AuthHandler
|
|||||||
{
|
{
|
||||||
eAuthCmd cmd;
|
eAuthCmd cmd;
|
||||||
uint32 status;
|
uint32 status;
|
||||||
bool (AuthSocket::*handler)(void);
|
bool (AuthSocket::*handler)();
|
||||||
} AuthHandler;
|
} 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
|
// 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
|
// Close patch file descriptor before leaving
|
||||||
AuthSocket::~AuthSocket(void) { }
|
AuthSocket::~AuthSocket() { }
|
||||||
|
|
||||||
// Accept the connection
|
// Accept the connection
|
||||||
void AuthSocket::OnAccept(void)
|
void AuthSocket::OnAccept()
|
||||||
{
|
{
|
||||||
sLog->outBasic("'%s:%d' Accepting connection", socket().getRemoteAddress().c_str(), socket().getRemotePort());
|
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)
|
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "AuthSocket::OnClose");
|
sLog->outDebug(LOG_FILTER_NETWORKIO, "AuthSocket::OnClose");
|
||||||
|
|||||||
@@ -31,11 +31,11 @@ public:
|
|||||||
const static int s_BYTE_SIZE = 32;
|
const static int s_BYTE_SIZE = 32;
|
||||||
|
|
||||||
AuthSocket(RealmSocket& socket);
|
AuthSocket(RealmSocket& socket);
|
||||||
~AuthSocket(void) override;
|
~AuthSocket() override;
|
||||||
|
|
||||||
void OnRead(void) override;
|
void OnRead() override;
|
||||||
void OnAccept(void) override;
|
void OnAccept() override;
|
||||||
void OnClose(void) override;
|
void OnClose() override;
|
||||||
|
|
||||||
static ACE_INET_Addr const& GetAddressForClient(Realm const& realm, ACE_INET_Addr const& clientAddr);
|
static ACE_INET_Addr const& GetAddressForClient(Realm const& realm, ACE_INET_Addr const& clientAddr);
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
RealmSocket& socket_;
|
RealmSocket& socket_;
|
||||||
RealmSocket& socket(void) { return socket_; }
|
RealmSocket& socket() { return socket_; }
|
||||||
|
|
||||||
BigNumber N, s, g, v;
|
BigNumber N, s, g, v;
|
||||||
BigNumber b, B;
|
BigNumber b, B;
|
||||||
|
|||||||
@@ -16,8 +16,8 @@
|
|||||||
class RealmAcceptor : public ACE_Acceptor<RealmSocket, ACE_SOCK_Acceptor>
|
class RealmAcceptor : public ACE_Acceptor<RealmSocket, ACE_SOCK_Acceptor>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RealmAcceptor(void) { }
|
RealmAcceptor() { }
|
||||||
virtual ~RealmAcceptor(void)
|
virtual ~RealmAcceptor()
|
||||||
{
|
{
|
||||||
if (reactor())
|
if (reactor())
|
||||||
reactor()->cancel_timer(this, 1);
|
reactor()->cancel_timer(this, 1);
|
||||||
@@ -41,7 +41,7 @@ protected:
|
|||||||
return reactor()->register_handler(this, ACE_Event_Handler::ACCEPT_MASK);
|
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 defined(ENFILE) && defined(EMFILE)
|
||||||
if (errno == ENFILE || errno == EMFILE)
|
if (errno == ENFILE || errno == EMFILE)
|
||||||
|
|||||||
@@ -2127,7 +2127,7 @@ public:
|
|||||||
m_DelayedOperations |= operation;
|
m_DelayedOperations |= operation;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CheckAreaExploreAndOutdoor(void);
|
void CheckAreaExploreAndOutdoor();
|
||||||
|
|
||||||
static TeamId TeamIdForRace(uint8 race);
|
static TeamId TeamIdForRace(uint8 race);
|
||||||
[[nodiscard]] TeamId GetTeamId(bool original = false) const { return original ? TeamIdForRace(getRace(true)) : m_team; };
|
[[nodiscard]] TeamId GetTeamId(bool original = false) const { return original ? TeamIdForRace(getRace(true)) : m_team; };
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public:
|
|||||||
return i_cells[x][y];
|
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 getX() const { return i_x; }
|
||||||
[[nodiscard]] int32 getY() const { return i_y; }
|
[[nodiscard]] int32 getY() const { return i_y; }
|
||||||
|
|
||||||
|
|||||||
@@ -336,7 +336,7 @@ public:
|
|||||||
bool UnloadGrid(NGridType& ngrid);
|
bool UnloadGrid(NGridType& ngrid);
|
||||||
virtual void UnloadAll();
|
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 ExistMap(uint32 mapid, int gx, int gy);
|
||||||
static bool ExistVMap(uint32 mapid, int gx, int gy);
|
static bool ExistVMap(uint32 mapid, int gx, int gy);
|
||||||
|
|||||||
@@ -11,11 +11,11 @@
|
|||||||
#include "RealmSocket.h"
|
#include "RealmSocket.h"
|
||||||
#include "Log.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),
|
input_buffer_(4096), session_(nullptr),
|
||||||
_remoteAddress(), _remotePort(0)
|
_remoteAddress(), _remotePort(0)
|
||||||
{
|
{
|
||||||
@@ -25,7 +25,7 @@ RealmSocket::RealmSocket(void) :
|
|||||||
msg_queue()->low_water_mark(8 * 1024 * 1024);
|
msg_queue()->low_water_mark(8 * 1024 * 1024);
|
||||||
}
|
}
|
||||||
|
|
||||||
RealmSocket::~RealmSocket(void)
|
RealmSocket::~RealmSocket()
|
||||||
{
|
{
|
||||||
if (msg_queue())
|
if (msg_queue())
|
||||||
msg_queue()->close();
|
msg_queue()->close();
|
||||||
@@ -75,17 +75,17 @@ int RealmSocket::close(u_long)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string& RealmSocket::getRemoteAddress(void) const
|
const std::string& RealmSocket::getRemoteAddress() const
|
||||||
{
|
{
|
||||||
return _remoteAddress;
|
return _remoteAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16 RealmSocket::getRemotePort(void) const
|
uint16 RealmSocket::getRemotePort() const
|
||||||
{
|
{
|
||||||
return _remotePort;
|
return _remotePort;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t RealmSocket::recv_len(void) const
|
size_t RealmSocket::recv_len() const
|
||||||
{
|
{
|
||||||
return input_buffer_.length();
|
return input_buffer_.length();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,27 +22,27 @@ public:
|
|||||||
class Session
|
class Session
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Session(void);
|
Session();
|
||||||
virtual ~Session(void);
|
virtual ~Session();
|
||||||
|
|
||||||
virtual void OnRead(void) = 0;
|
virtual void OnRead() = 0;
|
||||||
virtual void OnAccept(void) = 0;
|
virtual void OnAccept() = 0;
|
||||||
virtual void OnClose(void) = 0;
|
virtual void OnClose() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
RealmSocket(void);
|
RealmSocket();
|
||||||
~RealmSocket(void) override;
|
~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_soft(char* buf, size_t len);
|
||||||
bool recv(char* buf, size_t len);
|
bool recv(char* buf, size_t len);
|
||||||
void recv_skip(size_t len);
|
void recv_skip(size_t len);
|
||||||
|
|
||||||
bool send(const char* buf, 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;
|
int open(void*) override;
|
||||||
|
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ bool WDTFile::init(char* /*map_id*/, unsigned int mapID)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
WDTFile::~WDTFile(void)
|
WDTFile::~WDTFile()
|
||||||
{
|
{
|
||||||
WDT.close();
|
WDT.close();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ private:
|
|||||||
string filename;
|
string filename;
|
||||||
public:
|
public:
|
||||||
WDTFile(char* file_name, char* file_name1);
|
WDTFile(char* file_name, char* file_name1);
|
||||||
~WDTFile(void);
|
~WDTFile();
|
||||||
bool init(char* map_id, unsigned int mapID);
|
bool init(char* map_id, unsigned int mapID);
|
||||||
|
|
||||||
string* gWmoInstansName;
|
string* gWmoInstansName;
|
||||||
|
|||||||
Reference in New Issue
Block a user