Core/Misc: Replace ACE_UINT* to uint* (#1628)

* Core/Common: Replace ACE_UINT* to uint*

* #include "Common.h"
This commit is contained in:
Kargatum
2019-03-26 13:38:16 +07:00
committed by GitHub
parent 6ba32eaff1
commit 30b0325cee
5 changed files with 15 additions and 14 deletions

View File

@@ -42,12 +42,12 @@ class MapUpdateRequest : public ACE_Method_Request
Map& m_map; Map& m_map;
MapUpdater& m_updater; MapUpdater& m_updater;
ACE_UINT32 m_diff; uint32 m_diff;
ACE_UINT32 s_diff; uint32 s_diff;
public: public:
MapUpdateRequest(Map& m, MapUpdater& u, ACE_UINT32 d, ACE_UINT32 sd) MapUpdateRequest(Map& m, MapUpdater& u, uint32 d, uint32 sd)
: m_map(m), m_updater(u), m_diff(d), s_diff(sd) : m_map(m), m_updater(u), m_diff(d), s_diff(sd)
{ {
} }
@@ -65,10 +65,10 @@ class LFGUpdateRequest : public ACE_Method_Request
private: private:
MapUpdater& m_updater; MapUpdater& m_updater;
ACE_UINT32 m_diff; uint32 m_diff;
public: public:
LFGUpdateRequest(MapUpdater& u, ACE_UINT32 d) : m_updater(u), m_diff(d) {} LFGUpdateRequest(MapUpdater& u, uint32 d) : m_updater(u), m_diff(d) {}
virtual int call() virtual int call()
{ {
@@ -113,7 +113,7 @@ int MapUpdater::wait()
return 0; return 0;
} }
int MapUpdater::schedule_update(Map& map, ACE_UINT32 diff, ACE_UINT32 s_diff) int MapUpdater::schedule_update(Map& map, uint32 diff, uint32 s_diff)
{ {
TRINITY_GUARD(ACE_Thread_Mutex, m_mutex); TRINITY_GUARD(ACE_Thread_Mutex, m_mutex);
@@ -130,7 +130,7 @@ int MapUpdater::schedule_update(Map& map, ACE_UINT32 diff, ACE_UINT32 s_diff)
return 0; return 0;
} }
int MapUpdater::schedule_lfg_update(ACE_UINT32 diff) int MapUpdater::schedule_lfg_update(uint32 diff)
{ {
TRINITY_GUARD(ACE_Thread_Mutex, m_mutex); TRINITY_GUARD(ACE_Thread_Mutex, m_mutex);

View File

@@ -19,8 +19,8 @@ class MapUpdater
friend class MapUpdateRequest; friend class MapUpdateRequest;
friend class LFGUpdateRequest; friend class LFGUpdateRequest;
int schedule_update(Map& map, ACE_UINT32 diff, ACE_UINT32 s_diff); int schedule_update(Map& map, uint32 diff, uint32 s_diff);
int schedule_lfg_update(ACE_UINT32 diff); int schedule_lfg_update(uint32 diff);
int wait(); int wait();

View File

@@ -662,7 +662,7 @@ int WorldSocket::ProcessIncoming(WorldPacket* new_pct)
// manage memory ;) // manage memory ;)
ACE_Auto_Ptr<WorldPacket> aptr (new_pct); ACE_Auto_Ptr<WorldPacket> aptr (new_pct);
const ACE_UINT16 opcode = new_pct->GetOpcode(); const uint16 opcode = new_pct->GetOpcode();
if (closing_) if (closing_)
return -1; return -1;

View File

@@ -220,7 +220,7 @@ WorldSocketMgr::~WorldSocketMgr()
} }
int int
WorldSocketMgr::StartReactiveIO (ACE_UINT16 port, const char* address) WorldSocketMgr::StartReactiveIO (uint16 port, const char* address)
{ {
m_UseNoDelay = sConfigMgr->GetBoolDefault ("Network.TcpNodelay", true); m_UseNoDelay = sConfigMgr->GetBoolDefault ("Network.TcpNodelay", true);
@@ -266,7 +266,7 @@ WorldSocketMgr::StartReactiveIO (ACE_UINT16 port, const char* address)
} }
int int
WorldSocketMgr::StartNetwork (ACE_UINT16 port, const char* address) WorldSocketMgr::StartNetwork (uint16 port, const char* address)
{ {
if (!sLog->IsOutDebug()) if (!sLog->IsOutDebug())
ACE_Log_Msg::instance()->priority_mask (LM_ERROR, ACE_Log_Msg::PROCESS); ACE_Log_Msg::instance()->priority_mask (LM_ERROR, ACE_Log_Msg::PROCESS);

View File

@@ -13,6 +13,7 @@
#ifndef __WORLDSOCKETMGR_H #ifndef __WORLDSOCKETMGR_H
#define __WORLDSOCKETMGR_H #define __WORLDSOCKETMGR_H
#include "Common.h"
#include <ace/Basic_Types.h> #include <ace/Basic_Types.h>
#include <ace/Singleton.h> #include <ace/Singleton.h>
#include <ace/Thread_Mutex.h> #include <ace/Thread_Mutex.h>
@@ -29,7 +30,7 @@ public:
friend class ACE_Singleton<WorldSocketMgr, ACE_Thread_Mutex>; friend class ACE_Singleton<WorldSocketMgr, ACE_Thread_Mutex>;
/// Start network, listen at address:port . /// Start network, listen at address:port .
int StartNetwork(ACE_UINT16 port, const char* address); int StartNetwork(uint16 port, const char* address);
/// Stops all network threads, It will wait for all running threads . /// Stops all network threads, It will wait for all running threads .
void StopNetwork(); void StopNetwork();
@@ -40,7 +41,7 @@ public:
private: private:
int OnSocketOpen(WorldSocket* sock); int OnSocketOpen(WorldSocket* sock);
int StartReactiveIO(ACE_UINT16 port, const char* address); int StartReactiveIO(uint16 port, const char* address);
private: private:
WorldSocketMgr(); WorldSocketMgr();